Loading projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/UserPersistence.java +16 −2 Original line number Diff line number Diff line Loading @@ -91,9 +91,9 @@ public interface UserPersistence<T extends Principal> throws TransientException, AccessControlException; /** * Add the new user. * Add the user to the active user tree. * * @param user The user request to put into the request tree. * @param user The user request to put into the active user tree. * * @return User instance. * Loading @@ -104,6 +104,20 @@ public interface UserPersistence<T extends Principal> throws TransientException, AccessControlException, UserAlreadyExistsException; /** * Add the user to the pending user tree. * * @param user The user request to put into the pending user tree. * * @return User instance. * * @throws TransientException If an temporary, unexpected problem occurred. * @throws AccessControlException If the operation is not permitted. */ void addPendingUser(UserRequest<T> user) throws TransientException, AccessControlException, UserAlreadyExistsException; /** * Get the user specified by userID. * Loading projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapGroupDAO.java +2 −0 Original line number Diff line number Diff line Loading @@ -980,6 +980,8 @@ public class LdapGroupDAO<T extends Principal> extends LdapDAO { try { // TODO Subject has the X500Principal, no need to go to ldap. // TODO X500Principal is optional??? User<X500Principal> subjectUser = userPersist.getX500User(getSubjectDN()); if (subjectUser.equals(owner)) Loading projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapUserDAO.java +138 −183 File changed.Preview size limit exceeded, changes collapsed. Show changes projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapUserPersistence.java +33 −5 Original line number Diff line number Diff line Loading @@ -117,9 +117,9 @@ public class LdapUserPersistence<T extends Principal> } /** * Add the new user. * Add the user to the active user tree. * * @param user * @param user The user request to put into the active user tree. * * @return User instance. * Loading @@ -145,6 +145,35 @@ public class LdapUserPersistence<T extends Principal> } } /** * Add the user to the pending user tree. * * @param user The user request to put into the pending user tree. * * @return User instance. * * @throws TransientException If an temporary, unexpected problem occurred. * @throws AccessControlException If the operation is not permitted. */ public void addPendingUser(UserRequest<T> user) throws TransientException, AccessControlException, UserAlreadyExistsException { LdapUserDAO<T> userDAO = null; try { userDAO = new LdapUserDAO<T>(this.config); userDAO.addPendingUser(user); } finally { if (userDAO != null) { userDAO.close(); } } } /** * Get the user specified by userID. * Loading Loading @@ -183,9 +212,8 @@ public class LdapUserPersistence<T extends Principal> * @throws TransientException If an temporary, unexpected problem occurred. * @throws AccessControlException If the operation is not permitted. */ public User<T> getPendingUser(final T userID) throws UserNotFoundException, TransientException, AccessControlException public User<T> getPendingUser(final T userID) throws UserNotFoundException, TransientException, AccessControlException { LdapUserDAO<T> userDAO = null; try Loading projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/web/users/CreateUserAction.java +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ public class CreateUserAction extends AbstractUserAction { final UserPersistence<Principal> userPersistence = getUserPersistence(); final UserRequest<Principal> userRequest = readUserRequest(this.inputStream); userPersistence.addUser(userRequest); userPersistence.addPendingUser(userRequest); syncOut.setCode(201); logUserInfo(userRequest.getUser().getUserID().getName()); Loading Loading
projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/UserPersistence.java +16 −2 Original line number Diff line number Diff line Loading @@ -91,9 +91,9 @@ public interface UserPersistence<T extends Principal> throws TransientException, AccessControlException; /** * Add the new user. * Add the user to the active user tree. * * @param user The user request to put into the request tree. * @param user The user request to put into the active user tree. * * @return User instance. * Loading @@ -104,6 +104,20 @@ public interface UserPersistence<T extends Principal> throws TransientException, AccessControlException, UserAlreadyExistsException; /** * Add the user to the pending user tree. * * @param user The user request to put into the pending user tree. * * @return User instance. * * @throws TransientException If an temporary, unexpected problem occurred. * @throws AccessControlException If the operation is not permitted. */ void addPendingUser(UserRequest<T> user) throws TransientException, AccessControlException, UserAlreadyExistsException; /** * Get the user specified by userID. * Loading
projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapGroupDAO.java +2 −0 Original line number Diff line number Diff line Loading @@ -980,6 +980,8 @@ public class LdapGroupDAO<T extends Principal> extends LdapDAO { try { // TODO Subject has the X500Principal, no need to go to ldap. // TODO X500Principal is optional??? User<X500Principal> subjectUser = userPersist.getX500User(getSubjectDN()); if (subjectUser.equals(owner)) Loading
projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapUserDAO.java +138 −183 File changed.Preview size limit exceeded, changes collapsed. Show changes
projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapUserPersistence.java +33 −5 Original line number Diff line number Diff line Loading @@ -117,9 +117,9 @@ public class LdapUserPersistence<T extends Principal> } /** * Add the new user. * Add the user to the active user tree. * * @param user * @param user The user request to put into the active user tree. * * @return User instance. * Loading @@ -145,6 +145,35 @@ public class LdapUserPersistence<T extends Principal> } } /** * Add the user to the pending user tree. * * @param user The user request to put into the pending user tree. * * @return User instance. * * @throws TransientException If an temporary, unexpected problem occurred. * @throws AccessControlException If the operation is not permitted. */ public void addPendingUser(UserRequest<T> user) throws TransientException, AccessControlException, UserAlreadyExistsException { LdapUserDAO<T> userDAO = null; try { userDAO = new LdapUserDAO<T>(this.config); userDAO.addPendingUser(user); } finally { if (userDAO != null) { userDAO.close(); } } } /** * Get the user specified by userID. * Loading Loading @@ -183,9 +212,8 @@ public class LdapUserPersistence<T extends Principal> * @throws TransientException If an temporary, unexpected problem occurred. * @throws AccessControlException If the operation is not permitted. */ public User<T> getPendingUser(final T userID) throws UserNotFoundException, TransientException, AccessControlException public User<T> getPendingUser(final T userID) throws UserNotFoundException, TransientException, AccessControlException { LdapUserDAO<T> userDAO = null; try Loading
projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/web/users/CreateUserAction.java +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ public class CreateUserAction extends AbstractUserAction { final UserPersistence<Principal> userPersistence = getUserPersistence(); final UserRequest<Principal> userRequest = readUserRequest(this.inputStream); userPersistence.addUser(userRequest); userPersistence.addPendingUser(userRequest); syncOut.setCode(201); logUserInfo(userRequest.getUser().getUserID().getName()); Loading