use of cz.metacentrum.perun.audit.events.FacilityManagerEvents.BanUpdatedForFacility in project perun by CESNET.
the class FacilitiesManagerBlImpl method updateBan.
@Override
public BanOnFacility updateBan(PerunSession sess, BanOnFacility banOnFacility) {
banOnFacility = getFacilitiesManagerImpl().updateBan(sess, banOnFacility);
getPerunBl().getAuditer().log(sess, new BanUpdatedForFacility(banOnFacility, banOnFacility.getUserId(), banOnFacility.getFacilityId()));
return banOnFacility;
}
use of cz.metacentrum.perun.audit.events.FacilityManagerEvents.BanUpdatedForFacility in project perun by CESNET.
the class urn_perun_member_resource_attribute_def_virt_isBannedTest method setUp.
@Before
public void setUp() {
classInstance = new urn_perun_member_resource_attribute_def_virt_isBanned();
session = mock(PerunSessionImpl.class, RETURNS_DEEP_STUBS);
facility = new Facility(1, "testFacility");
resource = new Resource(1, "testResource", "des\nc", 1, 1);
vo = new Vo(1, "testVo", "desc");
user = new User(1, "name", "surname", "middlename", "title", "title");
member = new Member(1, 1, 1, Status.VALID);
isBanned = new Attribute(classInstance.getAttributeDefinition());
event1 = new BanSetForResource(new BanOnResource(), member.getId(), resource.getId());
event2 = new BanUpdatedForResource(new BanOnResource(), member.getId(), resource.getId());
event3 = new BanRemovedForResource(new BanOnResource(), member.getId(), resource.getId());
event4 = new BanSetForFacility(new BanOnFacility(), user.getId(), facility.getId());
event5 = new BanUpdatedForFacility(new BanOnFacility(), user.getId(), facility.getId());
event6 = new BanRemovedForFacility(new BanOnFacility(), user.getId(), facility.getId());
wrongEvent = new SecurityTeamAssignedToFacility();
}
Aggregations