private User setUpUser1() throws InternalErrorException, WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException { User user = new User(); user.setFirstName("James"); user.setMiddleName(""); user.setLastName("Bond"); user.setTitleBefore(""); user.setTitleAfter(""); return perun.getUsersManagerBl().createUser(session, user); }
public void removeAdmin(PerunSession sess, Vo vo, User user) throws InternalErrorException, PrivilegeException, VoNotExistsException, UserNotAdminException, UserNotExistsException { Utils.notNull(sess, "sess"); vosManagerBl.checkVoExists(sess, vo); perunBl.getUsersManagerBl().checkUserExists(sess, user); // Authorization - Vo admin required if (!AuthzResolver.isAuthorized(sess, Role.VOADMIN, vo)) { throw new PrivilegeException(sess, "deleteAdmin"); } vosManagerBl.removeAdmin(sess, vo, user); }