public Set<? extends Principal> getPrincipals(String userID) {
Set<Principal> principals;
Tree userTree = userProvider.getAuthorizable(userID, Type.USER);
if (userTree != null) {
principals = new HashSet<Principal>();
Principal userPrincipal = new TreeBasedPrincipal(userTree, pathMapper);
principals.add(userPrincipal);
principals.addAll(getGroupMembership(userPrincipal));
if (userProvider.isAdminUser(userTree)) {
principals.add(AdminPrincipal.INSTANCE);
}