use of cz.metacentrum.perun.core.api.exceptions.GroupNotAdminException in project perun by CESNET.
the class FacilitiesManagerBlImpl method removeAdmin.
@Override
public void removeAdmin(PerunSession sess, Facility facility, Group group) throws InternalErrorException, GroupNotAdminException {
List<Group> listOfAdmins = getAdminGroups(sess, facility);
if (!listOfAdmins.contains(group))
throw new GroupNotAdminException(group);
AuthzResolverBlImpl.unsetRole(sess, group, facility, Role.FACILITYADMIN);
getPerunBl().getAuditer().log(sess, "Group {} was removed from admins of {}.", group, facility);
}
use of cz.metacentrum.perun.core.api.exceptions.GroupNotAdminException in project perun by CESNET.
the class VosManagerBlImpl method removeAdmin.
@Override
public void removeAdmin(PerunSession sess, Vo vo, Group group) throws InternalErrorException, GroupNotAdminException {
List<Group> adminsOfVo = this.getAdminGroups(sess, vo);
if (!adminsOfVo.contains(group))
throw new GroupNotAdminException(group);
AuthzResolverBlImpl.unsetRole(sess, group, vo, Role.VOADMIN);
log.debug("Group [{}] deleted like administrator from VO [{}]", group, vo);
}
Aggregations