use of cz.metacentrum.perun.core.api.exceptions.AlreadyAdminException in project perun by CESNET.
the class FacilitiesManagerBlImpl method addAdmin.
@Override
public void addAdmin(PerunSession sess, Facility facility, Group group) throws InternalErrorException, AlreadyAdminException {
List<Group> listOfAdmins = getAdminGroups(sess, facility);
if (listOfAdmins.contains(group))
throw new AlreadyAdminException(group);
AuthzResolverBlImpl.setRole(sess, group, facility, Role.FACILITYADMIN);
getPerunBl().getAuditer().log(sess, "Group {} was added as admin of {}.", group, facility);
}
Aggregations