Commit c20a8d67 authored by Jeff Burke's avatar Jeff Burke
Browse files

s1890: update cadcAccessControl-Admin for DAO changes

parent fac331e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ public class ApproveUser extends AbstractUserCommand

        try
        {
            this.getUserPersistence().approvePendingUser(this.getPrincipal());
            this.getUserPersistence().approveUserRequest(this.getPrincipal());
            this.systemOut.println("User " + this.getPrincipal().getName() + " was approved successfully.");
            approved = true;
        }
+2 −2
Original line number Diff line number Diff line
@@ -187,13 +187,13 @@ public class CmdLineParser
    	if (am.isSet("list"))
    	{
            System.out.println("--list");
            this.command = new ListActiveUsers();
            this.command = new ListUsers();
            count++;
    	}

    	if (am.isSet("list-pending"))
    	{
            this.command = new ListPendingUsers();
            this.command = new ListUserRequests();
            count++;
    	}

+3 −3
Original line number Diff line number Diff line
@@ -83,13 +83,13 @@ import ca.nrc.cadc.net.TransientException;
 * @author yeunga
 *
 */
public class ListPendingUsers extends AbstractListUsers
public class ListUserRequests extends AbstractListUsers
{
    private static final Logger log = Logger.getLogger(ListPendingUsers.class);
    private static final Logger log = Logger.getLogger(ListUserRequests.class);

    protected Collection<User> getUsers()
    		throws AccessControlException, TransientException
    {
    	return this.getUserPersistence().getPendingUsers();
    	return this.getUserPersistence().getUserRequests();
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -83,9 +83,9 @@ import ca.nrc.cadc.net.TransientException;
 * @author yeunga
 *
 */
public class ListActiveUsers extends AbstractListUsers
public class ListUsers extends AbstractListUsers
{
    private static final Logger log = Logger.getLogger(ListActiveUsers.class);
    private static final Logger log = Logger.getLogger(ListUsers.class);

    protected Collection<User> getUsers()
    		throws AccessControlException, TransientException
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ public class RejectUser extends AbstractUserCommand
        throws AccessControlException, UserNotFoundException, TransientException 
    {
        // delete user from the pending tree
        this.getUserPersistence().deletePendingUser(this.getPrincipal());
        this.getUserPersistence().deleteUserRequest(this.getPrincipal());
        String msg = "User " + this.getPrincipal().getName() + " was rejected successfully.";
        this.systemOut.println(msg);
    }
Loading