use of cz.metacentrum.perun.audit.events.ResourceManagerEvents.BanRemovedForResource in project perun by CESNET.
the class ResourcesManagerBlImpl method removeBan.
@Override
public void removeBan(PerunSession sess, int memberId, int resourceId) throws BanNotExistsException {
BanOnResource ban = this.getBan(sess, memberId, resourceId);
getResourcesManagerImpl().removeBan(sess, memberId, resourceId);
getPerunBl().getAuditer().log(sess, new BanRemovedForResource(ban, memberId, resourceId));
}
use of cz.metacentrum.perun.audit.events.ResourceManagerEvents.BanRemovedForResource 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