use of cz.metacentrum.perun.audit.events.ResourceManagerEvents.BanUpdatedForResource 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();
}
use of cz.metacentrum.perun.audit.events.ResourceManagerEvents.BanUpdatedForResource in project perun by CESNET.
the class ResourcesManagerBlImpl method updateBan.
@Override
public BanOnResource updateBan(PerunSession sess, BanOnResource banOnResource) {
banOnResource = getResourcesManagerImpl().updateBan(sess, banOnResource);
getPerunBl().getAuditer().log(sess, new BanUpdatedForResource(banOnResource, banOnResource.getMemberId(), banOnResource.getResourceId()));
return banOnResource;
}
Aggregations