Skip to content
Snippets Groups Projects
Commit 6b3f7fda authored by Alinga Yeung's avatar Alinga Yeung
Browse files

Story ac2 rework. Removed getUserGroups() from the API since we already have...

Story ac2 rework. Removed getUserGroups() from the API since we already have getGroups(). This also stops us from exposing com.unboundid.ldap.sdk.DN to the API.
parent 7db520cc
No related branches found
No related tags found
No related merge requests found
......@@ -72,8 +72,6 @@ import java.security.AccessControlException;
import java.security.Principal;
import java.util.Collection;
import com.unboundid.ldap.sdk.DN;
import ca.nrc.cadc.ac.Group;
import ca.nrc.cadc.ac.GroupAlreadyExistsException;
import ca.nrc.cadc.ac.GroupNotFoundException;
......@@ -108,24 +106,6 @@ public abstract interface GroupPersistence<T extends Principal>
throws GroupNotFoundException, TransientException,
AccessControlException;
/**
* Get all groups the user, specified by userID, belongs to.
*
* @param userID The userID.
* @param isAdmin return only admin Groups when true, else return non-admin
* Groups.
*
* @return Collection of group DN.
*
* @throws UserNotFoundException when the user is not found.
* @throws TransientException If an temporary, unexpected problem occurred.
* @throws AccessControlException If the operation is not permitted.
*/
Collection<DN> getUserGroups(T userID, boolean isAdmin)
throws UserNotFoundException, TransientException,
AccessControlException;
/**
* Creates the group.
*
......
......@@ -146,14 +146,6 @@ public class LdapGroupPersistence<T extends Principal>
}
}
}
public Collection<DN> getUserGroups(T userID, boolean isAdmin)
throws UserNotFoundException, TransientException,
AccessControlException
{
return (new LdapUserPersistence<T>()).getUserGroups(userID, isAdmin);
}
public Group addGroup(Group group)
throws GroupAlreadyExistsException, TransientException,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment