public class UserManagerImpl extends Object implements UserManager, MultiTenantUserManager, AdministratorGroupsProvider
UserManager.MatchType| Constructor and Description | 
|---|
UserManagerImpl()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
appendSubgroups(String groupId,
               Set<String> groups,
               DocumentModel context)  | 
Boolean | 
areGroupsReadOnly()
Returns true is users referential is read only (ie : LDAP) -> can not add users -> can not delete users. 
 | 
Boolean | 
areUsersReadOnly()
Returns true is groups referential is read only (ie : LDAP) -> can not add groups -> can not delete groups. 
 | 
Principal | 
authenticate(String name,
            String password)
Get a principal object for the given username if the username / password pair is valid, otherwise returns null. 
 | 
protected void | 
checkGrouId(DocumentModel groupModel)  | 
protected void | 
checkGroupsExistence(DocumentModel userModel,
                    String schema,
                    DocumentModel context)  | 
protected void | 
checkPasswordValidity(DocumentModel userModel)  | 
protected void | 
checkUserId(DocumentModel userModel)  | 
boolean | 
checkUsernamePassword(String username,
                     String password)
Check the password for the given username. 
 | 
protected Map<String,Serializable> | 
cloneMap(Map<String,Serializable> map)  | 
protected HashSet<String> | 
cloneSet(Set<String> set)  | 
DocumentModel | 
createGroup(DocumentModel groupModel)
Creates a group from given model 
 | 
DocumentModel | 
createGroup(DocumentModel groupModel,
           DocumentModel context)
Creates a group from given model with the given context. 
 | 
DocumentModel | 
createUser(DocumentModel userModel)
Creates user from given model. 
 | 
DocumentModel | 
createUser(DocumentModel userModel,
          DocumentModel context)
Creates user from given model into the given context document. 
 | 
void | 
deleteGroup(DocumentModel groupModel)
Deletes group represented by given model. 
 | 
void | 
deleteGroup(DocumentModel groupModel,
           DocumentModel context)
Deletes group represented by given model with the given context. 
 | 
void | 
deleteGroup(String groupId)
Deletes group with given id. 
 | 
void | 
deleteGroup(String groupId,
           DocumentModel context)
Deletes group with given id with the given context. 
 | 
void | 
deleteUser(DocumentModel userModel)
Deletes user represented by given model. 
 | 
void | 
deleteUser(DocumentModel userModel,
          DocumentModel context)
Deletes user represented by given model into the given context document. 
 | 
void | 
deleteUser(String userId)
Deletes user with given id. 
 | 
void | 
deleteUser(String userId,
          DocumentModel context)
Deletes user with given id into the given context document. 
 | 
static String | 
encodeDigestAuthPassword(String username,
                        String realm,
                        String password)  | 
List<String> | 
getAdministratorsGroups()
Returns the list of administrators groups. 
 | 
List<String> | 
getAncestorGroups(String groupId)
Returns the ancestor groups of the group with the given id. 
 | 
String | 
getAnonymousUserId()
Gets the anonymous user id. 
 | 
DocumentModel | 
getBareGroupModel()
Returns a bare group model. 
 | 
DocumentModel | 
getBareUserModel()
Returns a bare user model. 
 | 
String | 
getDefaultGroup()  | 
String | 
getDigestAuthDirectory()
Gets the Digest Auth directory. 
 | 
protected DocumentModel | 
getDigestAuthModel()  | 
String | 
getDigestAuthRealm()
Gets the Digest Auth realm. 
 | 
protected Map<String,String> | 
getDirectorySortMap(String descriptorSortField,
                   String fallBackField)  | 
NuxeoGroup | 
getGroup(String groupName)
Returns the nuxeo group with given name or null if it does not exist. 
 | 
protected NuxeoGroup | 
getGroup(String groupName,
        DocumentModel context)  | 
GroupConfig | 
getGroupConfig()
Returns the contributed  
GroupConfig. | 
String | 
getGroupDirectoryName()
Gets the group directory name. 
 | 
protected String | 
getGroupId(DocumentModel groupModel)  | 
String | 
getGroupIdField()
Returns the group directory id field. 
 | 
List<String> | 
getGroupIds()
Returns the list of all groups ids. 
 | 
List<String> | 
getGroupIds(DocumentModel context)
Returns the list of all groups ids with the given context. 
 | 
String | 
getGroupLabelField()
Returns the group label field. 
 | 
String | 
getGroupListingMode()  | 
String | 
getGroupMembersField()
Gets the group members field. 
 | 
DocumentModel | 
getGroupModel(String groupName)
Return the group document model with this id or null if group does not exist. 
 | 
DocumentModel | 
getGroupModel(String groupIdValue,
             DocumentModel context)
Return the group document model with this id concatenated with the directory local config (if not null) or null
 if group does not exist. 
 | 
protected OrderByExpr | 
getGroupOrderBy()  | 
String | 
getGroupParentGroupsField()
Gets the group parent-groups field. 
 | 
String | 
getGroupSchemaName()
Returns the group directory schema name. 
 | 
Set<String> | 
getGroupSearchFields()
Gets the group search fields. 
 | 
List<String> | 
getGroupsInGroup(String parentId)
Returns the list of groups that belong to this group. 
 | 
List<String> | 
getGroupsInGroup(String parentId,
                DocumentModel context)
Returns the list of groups that belong to this group with the given context. 
 | 
protected Map<String,String> | 
getGroupSortMap()  | 
String | 
getGroupSubGroupsField()
Gets the group sub-groups field. 
 | 
protected List<String> | 
getLeafPermissions(String perm)  | 
NuxeoPrincipal | 
getPrincipal(String username)
Retrieves the principal with the given username or null if it does not exist. 
 | 
NuxeoPrincipal | 
getPrincipal(String username,
            DocumentModel context)
Retrieves the principal with the given username or null if it does not exist into the given context document. 
 | 
protected NuxeoPrincipal | 
getPrincipalUsingCache(String username)  | 
protected QueryBuilder | 
getQueryForPattern(String pattern,
                  String dirName,
                  Map<String,UserManager.MatchType> searchFields,
                  OrderByExpr orderBy)  | 
List<String> | 
getTopLevelGroups()
Returns the list of groups that are not members of other groups. 
 | 
List<String> | 
getTopLevelGroups(DocumentModel context)
Returns the list of groups that are not members of other groups with the given context. 
 | 
String | 
getUserDirectoryName()
Gets the user directory name. 
 | 
String | 
getUserEmailField()
Gets the user email field. 
 | 
protected String | 
getUserId(DocumentModel userModel)  | 
String | 
getUserIdField()
Returns the user directory id field. 
 | 
List<String> | 
getUserIds()
Returns the list of all user ids. 
 | 
List<String> | 
getUserIds(DocumentModel context)
Returns the list of all user ids into the given context document. 
 | 
String | 
getUserListingMode()  | 
DocumentModel | 
getUserModel(String userName)
Returns the document model representing user with given id or null if it does not exist. 
 | 
DocumentModel | 
getUserModel(String userName,
            DocumentModel context)
Returns the document model representing user with given id or null if it does not exist into the given context
 document. 
 | 
protected OrderByExpr | 
getUserOrderBy()  | 
Pattern | 
getUserPasswordPattern()  | 
String | 
getUserSchemaName()
Returns the user directory schema name. 
 | 
Set<String> | 
getUserSearchFields()
Gets the user search fields, the fields to use when a principal search is done. 
 | 
String[] | 
getUsersForPermission(String perm,
                     ACP acp)
For an ACP, get the list of user that has a permission. 
 | 
String[] | 
getUsersForPermission(String perm,
                     ACP acp,
                     DocumentModel context)
For an ACP, get the list of user that has a permission into the given context. 
 | 
List<String> | 
getUsersInGroup(String groupId)
Returns the list of users that belong to this group. 
 | 
List<String> | 
getUsersInGroup(String groupId,
               DocumentModel context)
Returns the list of users that belong to this group into the given context 
 | 
List<String> | 
getUsersInGroupAndSubGroups(String groupId)
Get users from a group and its subgroups. 
 | 
List<String> | 
getUsersInGroupAndSubGroups(String groupId,
                           DocumentModel context)
Get users from a group and its subgroups into the given context 
 | 
String | 
getUserSortField()  | 
protected Map<String,String> | 
getUserSortMap()  | 
void | 
handleEvent(Event event)
An event was received. 
 | 
protected void | 
invalidateAllPrincipals()  | 
protected void | 
invalidatePrincipal(String userName)  | 
protected boolean | 
isAnonymousMatching(Map<String,Serializable> filter,
                   Set<String> fulltext)  | 
protected boolean | 
isAnonymousMatching(QueryBuilder queryBuilder,
                   Directory dir)  | 
protected NuxeoPrincipal | 
makeAnonymousPrincipal()  | 
protected NuxeoGroup | 
makeGroup(DocumentModel groupEntry)  | 
protected NuxeoPrincipal | 
makePrincipal(DocumentModel userEntry)  | 
protected NuxeoPrincipal | 
makePrincipal(DocumentModel userEntry,
             boolean anonymous,
             boolean isTransient,
             List<String> groups)  | 
protected NuxeoPrincipal | 
makePrincipal(DocumentModel userEntry,
             boolean anonymous,
             List<String> groups)  | 
protected NuxeoPrincipal | 
makeTransientPrincipal(String username)  | 
protected NuxeoPrincipal | 
makeVirtualPrincipal(VirtualUser user)  | 
protected DocumentModel | 
makeVirtualUserEntry(String id,
                    VirtualUser user)  | 
protected void | 
notifyCore(String userOrGroupId,
          String eventId)  | 
protected void | 
notifyCore(String userOrGroupId,
          String eventId,
          List<String> ancestorGroupIds)  | 
void | 
notifyGroupChanged(String groupName,
                  String eventId,
                  List<String> ancestorGroupNames)
Notifies that the given group has changed with the given event:
 
 At the runtime level so that the JaasCacheFlusher listener can make sure the principal cache is reset.
 At the core level, passing the  
groupName as the "id" property of the fired event.
  | 
protected void | 
notifyRuntime(String userOrGroupName,
             String eventId)  | 
void | 
notifyUserChanged(String userName,
                 String eventId)
Notifies that the given user has changed with the given event:
 
 At the runtime level so that the JaasCacheFlusher listener can make sure the principal cache is reset.
 At the core level, passing the  
userName as the "id" property of the fired event.
  | 
protected void | 
populateAncestorGroups(String groupId,
                      List<String> ancestorGroups)  | 
protected DocumentModelList | 
queryWithVirtualEntries(Session session,
                       QueryBuilder queryBuilder,
                       List<DocumentModel> virtualEntries)
Executes a query then adds virtual entries (already supposed to match the query). 
 | 
protected void | 
removeVirtualFilters(Map<String,Serializable> filter)  | 
DocumentModelList | 
searchGroups(Map<String,Serializable> filter,
            Set<String> fulltext)
Returns groups matching given criteria. 
 | 
DocumentModelList | 
searchGroups(Map<String,Serializable> filter,
            Set<String> fulltext,
            DocumentModel context)
Returns groups matching given criteria with the given context. 
 | 
DocumentModelList | 
searchGroups(QueryBuilder queryBuilder)
Returns groups matching the given query. 
 | 
DocumentModelList | 
searchGroups(QueryBuilder queryBuilder,
            DocumentModel context)
Returns groups matching the given query, within the given context. 
 | 
DocumentModelList | 
searchGroups(String pattern)
Search matching groups through their defined search fields 
 | 
DocumentModelList | 
searchGroups(String pattern,
            DocumentModel context)
Search matching groups through their defined search fields into the given context document. 
 | 
List<NuxeoPrincipal> | 
searchPrincipals(String pattern)  | 
DocumentModelList | 
searchUsers(Map<String,Serializable> filter,
           Set<String> fulltext)
Returns users matching given criteria. 
 | 
DocumentModelList | 
searchUsers(Map<String,Serializable> filter,
           Set<String> fulltext,
           DocumentModel context)
Returns users matching given criteria and with the given context. 
 | 
DocumentModelList | 
searchUsers(Map<String,Serializable> filter,
           Set<String> fulltext,
           Map<String,String> orderBy,
           DocumentModel context)
MULTI-TENANT-IMPLEMENTATION 
 | 
DocumentModelList | 
searchUsers(QueryBuilder queryBuilder)
Returns users matching the given query. 
 | 
DocumentModelList | 
searchUsers(QueryBuilder queryBuilder,
           DocumentModel context)
Returns users matching the given query, within the given context. 
 | 
DocumentModelList | 
searchUsers(String pattern)
Returns users matching given pattern 
 | 
DocumentModelList | 
searchUsers(String pattern,
           DocumentModel context)
Returns users matching given pattern with the given context. 
 | 
void | 
setConfiguration(UserManagerDescriptor descriptor)
Sets the given configuration on the service. 
 | 
protected void | 
setGroupDirectoryName(String groupDirectoryName)  | 
protected void | 
setUserDirectoryName(String userDirectoryName)  | 
protected void | 
setVirtualUsers(Map<String,VirtualUserDescriptor> virtualUsers)  | 
protected void | 
syncDigestAuthPassword(String username,
                      String password)  | 
void | 
updateGroup(DocumentModel groupModel)
Updates group represented by given model. 
 | 
void | 
updateGroup(DocumentModel groupModel,
           DocumentModel context)
Updates group represented by given model with the given context. 
 | 
void | 
updateUser(DocumentModel userModel)
Updates user represented by given model. 
 | 
void | 
updateUser(DocumentModel userModel,
          DocumentModel context)
Updates user represented by given model into the given context document. 
 | 
protected boolean | 
useCache()  | 
boolean | 
validatePassword(String password)  | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnotifyGroupChangedpublic static final String USERMANAGER_TOPIC
public static final String USERCHANGED_EVENT_ID
public static final String USERCREATED_EVENT_ID
public static final String USERDELETED_EVENT_ID
public static final String USERMODIFIED_EVENT_ID
public static final String GROUPCHANGED_EVENT_ID
public static final String GROUPCREATED_EVENT_ID
public static final String GROUPDELETED_EVENT_ID
public static final String GROUPMODIFIED_EVENT_ID
public static final String DEFAULT_ANONYMOUS_USER_ID
public static final String VIRTUAL_FIELD_FILTER_PREFIX
public static final String INVALIDATE_PRINCIPAL_EVENT_ID
public static final String INVALIDATE_ALL_PRINCIPALS_EVENT_ID
public static final String USER_GROUP_CATEGORY
DocumentEventContext.CATEGORY_PROPERTY_KEY key of a core event context.public static final String ID_PROPERTY_KEY
public static final String ANCESTOR_GROUPS_PROPERTY_KEY
protected final DirectoryService dirService
protected final CacheService cacheService
protected Cache principalCache
public UserMultiTenantManagement multiTenantManagement
protected UserConfig userConfig
protected GroupConfig groupConfig
protected String userDirectoryName
protected String userSchemaName
protected String userIdField
protected String userEmailField
protected Map<String,UserManager.MatchType> userSearchFields
protected String groupDirectoryName
protected String groupSchemaName
protected String groupIdField
protected String groupLabelField
protected String groupMembersField
protected String groupSubGroupsField
protected String groupParentGroupsField
protected String groupSortField
protected Map<String,UserManager.MatchType> groupSearchFields
protected String defaultGroup
protected List<String> administratorIds
protected List<String> administratorGroups
protected Boolean disableDefaultAdministratorsGroup
protected String userSortField
protected String userListingMode
protected String groupListingMode
protected Pattern userPasswordPattern
protected VirtualUser anonymousUser
protected String digestAuthDirectory
protected String digestAuthRealm
protected final Map<String,VirtualUserDescriptor> virtualUsers
public UserManagerImpl()
public void setConfiguration(UserManagerDescriptor descriptor)
UserManagersetConfiguration in interface UserManagerdescriptor - the descriptor as parsed from xml, merged from the previous one if it exists.protected void setUserDirectoryName(String userDirectoryName)
public String getUserDirectoryName()
UserManagergetUserDirectoryName in interface UserManagerpublic String getUserIdField()
UserManagergetUserIdField in interface UserManagerpublic String getUserSchemaName()
UserManagergetUserSchemaName in interface UserManagerpublic String getUserEmailField()
UserManagergetUserEmailField in interface UserManagerpublic Set<String> getUserSearchFields()
UserManagergetUserSearchFields in interface UserManagerpublic Set<String> getGroupSearchFields()
UserManagergetGroupSearchFields in interface UserManagerprotected void setGroupDirectoryName(String groupDirectoryName)
public String getGroupDirectoryName()
UserManagergetGroupDirectoryName in interface UserManagerpublic String getGroupIdField()
UserManagergetGroupIdField in interface UserManagerpublic String getGroupLabelField()
UserManagergetGroupLabelField in interface UserManagerpublic String getGroupSchemaName()
UserManagergetGroupSchemaName in interface UserManagerpublic String getGroupMembersField()
UserManagergetGroupMembersField in interface UserManagerpublic String getGroupSubGroupsField()
UserManagergetGroupSubGroupsField in interface UserManagerpublic String getGroupParentGroupsField()
UserManagergetGroupParentGroupsField in interface UserManagerpublic String getUserListingMode()
getUserListingMode in interface UserManagerpublic String getGroupListingMode()
getGroupListingMode in interface UserManagerpublic String getDefaultGroup()
getDefaultGroup in interface UserManagerpublic Pattern getUserPasswordPattern()
getUserPasswordPattern in interface UserManagerpublic String getAnonymousUserId()
UserManagergetAnonymousUserId in interface UserManagerprotected void setVirtualUsers(Map<String,VirtualUserDescriptor> virtualUsers)
public boolean checkUsernamePassword(String username, String password)
AuthenticatorcheckUsernamePassword in interface UserManagercheckUsernamePassword in interface Authenticatorusername - the usernamepassword - the password to checkprotected void syncDigestAuthPassword(String username, String password)
protected DocumentModel getDigestAuthModel()
public static String encodeDigestAuthPassword(String username, String realm, String password)
public String getDigestAuthDirectory()
UserManagergetDigestAuthDirectory in interface UserManagerpublic String getDigestAuthRealm()
UserManagergetDigestAuthRealm in interface UserManagerpublic boolean validatePassword(String password)
validatePassword in interface UserManagerprotected NuxeoPrincipal makeAnonymousPrincipal()
protected NuxeoPrincipal makeVirtualPrincipal(VirtualUser user)
protected NuxeoPrincipal makeTransientPrincipal(String username)
protected DocumentModel makeVirtualUserEntry(String id, VirtualUser user)
protected NuxeoPrincipal makePrincipal(DocumentModel userEntry)
protected NuxeoPrincipal makePrincipal(DocumentModel userEntry, boolean anonymous, List<String> groups)
protected NuxeoPrincipal makePrincipal(DocumentModel userEntry, boolean anonymous, boolean isTransient, List<String> groups)
protected boolean useCache()
public NuxeoPrincipal getPrincipal(String username)
UserManagerCan build principals for anonymous and virtual users as well as for users defined in the users directory.
getPrincipal in interface UserManagerprotected NuxeoPrincipal getPrincipalUsingCache(String username)
public DocumentModel getUserModel(String userName)
UserManagergetUserModel in interface UserManagerpublic DocumentModel getBareUserModel()
UserManagerCan be used for user creation/search screens.
getBareUserModel in interface UserManagerpublic NuxeoGroup getGroup(String groupName)
UserManagergetGroup in interface UserManagerprotected NuxeoGroup getGroup(String groupName, DocumentModel context)
public DocumentModel getGroupModel(String groupName)
UserManagergetGroupModel in interface UserManagergroupName - the group identifierprotected NuxeoGroup makeGroup(DocumentModel groupEntry)
public List<String> getTopLevelGroups()
UserManagergetTopLevelGroups in interface UserManagerpublic List<String> getGroupsInGroup(String parentId)
UserManagergetGroupsInGroup in interface UserManagerparentId - the name of the parent group.public List<String> getUsersInGroup(String groupId)
UserManagergetUsersInGroup in interface UserManagergroupId - ID of the grouppublic List<String> getUsersInGroupAndSubGroups(String groupId)
UserManagergetUsersInGroupAndSubGroups in interface UserManagergroupId - ID of the groupprotected void appendSubgroups(String groupId, Set<String> groups, DocumentModel context)
protected boolean isAnonymousMatching(Map<String,Serializable> filter, Set<String> fulltext)
protected boolean isAnonymousMatching(QueryBuilder queryBuilder, Directory dir)
public List<NuxeoPrincipal> searchPrincipals(String pattern)
searchPrincipals in interface UserManagerpublic DocumentModelList searchGroups(String pattern)
UserManagersearchGroups in interface UserManagerpublic String getUserSortField()
getUserSortField in interface UserManagerprotected Map<String,String> getUserSortMap()
protected OrderByExpr getUserOrderBy()
protected Map<String,String> getGroupSortMap()
protected OrderByExpr getGroupOrderBy()
protected Map<String,String> getDirectorySortMap(String descriptorSortField, String fallBackField)
protected void notifyCore(String userOrGroupId, String eventId)
protected void notifyCore(String userOrGroupId, String eventId, List<String> ancestorGroupIds)
protected void notifyRuntime(String userOrGroupName, String eventId)
public void notifyUserChanged(String userName, String eventId)
UserManageruserName as the "id" property of the fired event.notifyUserChanged in interface UserManagerprotected void invalidatePrincipal(String userName)
public void notifyGroupChanged(String groupName, String eventId, List<String> ancestorGroupNames)
UserManagergroupName as the "id" property of the fired event.
 The ancestorGroupNames list must contain the ancestor groups of the given group. It can be computed by
 calling UserManager.getAncestorGroups(String). It will be passed as the "ancestorGroups" property of the
 fired core event.
notifyGroupChanged in interface UserManagerprotected void invalidateAllPrincipals()
public Boolean areGroupsReadOnly()
UserManagerareGroupsReadOnly in interface MultiTenantUserManagerareGroupsReadOnly in interface UserManagerpublic Boolean areUsersReadOnly()
UserManagerareUsersReadOnly in interface MultiTenantUserManagerareUsersReadOnly in interface UserManagerprotected void checkGrouId(DocumentModel groupModel)
protected String getGroupId(DocumentModel groupModel)
protected void checkUserId(DocumentModel userModel)
protected String getUserId(DocumentModel userModel)
public DocumentModel createGroup(DocumentModel groupModel)
UserManagercreateGroup in interface UserManagerpublic DocumentModel createUser(DocumentModel userModel)
UserManagercreateUser in interface UserManagerpublic void deleteGroup(String groupId)
UserManagerdeleteGroup in interface UserManagerpublic void deleteGroup(DocumentModel groupModel)
UserManagerdeleteGroup in interface UserManagerpublic void deleteUser(String userId)
UserManagerdeleteUser in interface UserManagerpublic void deleteUser(DocumentModel userModel)
UserManagerdeleteUser in interface UserManagerpublic List<String> getGroupIds()
UserManagergetGroupIds in interface UserManagerpublic List<String> getUserIds()
UserManagergetUserIds in interface UserManagerprotected void removeVirtualFilters(Map<String,Serializable> filter)
protected QueryBuilder getQueryForPattern(String pattern, String dirName, Map<String,UserManager.MatchType> searchFields, OrderByExpr orderBy)
public DocumentModelList searchGroups(Map<String,Serializable> filter, Set<String> fulltext)
UserManagersearchGroups in interface UserManagerfilter - filter with field names as keysfulltext - field names used for fulltext matchpublic DocumentModelList searchGroups(QueryBuilder queryBuilder)
UserManagersearchGroups in interface UserManagerqueryBuilder - the query to use, including limit, offset, ordering and countTotalpublic DocumentModelList searchUsers(String pattern)
UserManagerPattern is used to fill a filter and fulltext map according to users search fields configuration. Search is performed on each of these fields (OR).
searchUsers in interface UserManagerpublic DocumentModelList searchUsers(Map<String,Serializable> filter, Set<String> fulltext)
UserManagersearchUsers in interface UserManagerfilter - filter with field names as keysfulltext - field names used for fulltext matchpublic DocumentModelList searchUsers(QueryBuilder queryBuilder)
UserManagersearchUsers in interface UserManagerqueryBuilder - the query to use, including limit, offset, ordering and countTotalpublic void updateGroup(DocumentModel groupModel)
UserManagerupdateGroup in interface UserManagerpublic void updateUser(DocumentModel userModel)
UserManagerupdateUser in interface UserManagerpublic DocumentModel getBareGroupModel()
UserManagerCan be used for group creation/search screens.
getBareGroupModel in interface UserManagerpublic List<String> getAdministratorsGroups()
UserManagergetAdministratorsGroups in interface AdministratorGroupsProvidergetAdministratorsGroups in interface UserManagerprotected List<String> getLeafPermissions(String perm)
public String[] getUsersForPermission(String perm, ACP acp)
UserManagergetUsersForPermission in interface UserManagerperm - the permissionacp - The access control policy of the documentpublic Principal authenticate(String name, String password)
AuthenticatorThis method is doing the authentication of the given username / password pair and returns the corresponding principal object if authentication succeeded otherwise returns null.
authenticate in interface Authenticatorpublic DocumentModelList searchUsers(Map<String,Serializable> filter, Set<String> fulltext, Map<String,String> orderBy, DocumentModel context)
public List<String> getUsersInGroup(String groupId, DocumentModel context)
MultiTenantUserManagergetUsersInGroup in interface MultiTenantUserManagergroupId - ID of the grouppublic DocumentModelList searchUsers(String pattern, DocumentModel context)
MultiTenantUserManagerPattern is used to fill a filter and fulltext map according to users search fields configuration. Search is performed on each of these fields (OR).
searchUsers in interface MultiTenantUserManagerpublic DocumentModelList searchUsers(QueryBuilder queryBuilder, DocumentModel context)
MultiTenantUserManagersearchUsers in interface MultiTenantUserManagerqueryBuilder - the query to use, including limit, offset, ordering and countTotalcontext - the context for the tenant, or nullprotected DocumentModelList queryWithVirtualEntries(Session session, QueryBuilder queryBuilder, List<DocumentModel> virtualEntries)
public DocumentModelList searchUsers(Map<String,Serializable> filter, Set<String> fulltext, DocumentModel context)
MultiTenantUserManagersearchUsers in interface MultiTenantUserManagerfilter - filter with field names as keysfulltext - field names used for fulltext matchpublic List<String> getGroupIds(DocumentModel context)
MultiTenantUserManagergetGroupIds in interface MultiTenantUserManagerpublic DocumentModelList searchGroups(Map<String,Serializable> filter, Set<String> fulltext, DocumentModel context)
MultiTenantUserManagersearchGroups in interface MultiTenantUserManagerfilter - filter with field names as keysfulltext - field names used for fulltext matchpublic DocumentModelList searchGroups(QueryBuilder queryBuilder, DocumentModel context)
MultiTenantUserManagersearchGroups in interface MultiTenantUserManagerqueryBuilder - the query to use, including limit, offset, ordering and countTotalcontext - the context for the tenant, or nullpublic DocumentModel createGroup(DocumentModel groupModel, DocumentModel context) throws GroupAlreadyExistsException
MultiTenantUserManagercreateGroup in interface MultiTenantUserManagerGroupAlreadyExistsExceptionpublic DocumentModel getGroupModel(String groupIdValue, DocumentModel context)
MultiTenantUserManagergetGroupModel in interface MultiTenantUserManagergroupIdValue - the group identifierpublic DocumentModel getUserModel(String userName, DocumentModel context)
MultiTenantUserManagergetUserModel in interface MultiTenantUserManagerprotected Map<String,Serializable> cloneMap(Map<String,Serializable> map)
public NuxeoPrincipal getPrincipal(String username, DocumentModel context)
MultiTenantUserManagerCan build principals for anonymous and virtual users as well as for users defined in the users directory.
getPrincipal in interface MultiTenantUserManagerpublic DocumentModelList searchGroups(String pattern, DocumentModel context)
MultiTenantUserManagersearchGroups in interface MultiTenantUserManagerpublic List<String> getUserIds(DocumentModel context)
MultiTenantUserManagergetUserIds in interface MultiTenantUserManagerpublic DocumentModel createUser(DocumentModel userModel, DocumentModel context) throws UserAlreadyExistsException
MultiTenantUserManagercreateUser in interface MultiTenantUserManagerUserAlreadyExistsExceptionprotected void checkGroupsExistence(DocumentModel userModel, String schema, DocumentModel context)
protected void checkPasswordValidity(DocumentModel userModel) throws InvalidPasswordException
InvalidPasswordExceptionpublic void updateUser(DocumentModel userModel, DocumentModel context)
MultiTenantUserManagerupdateUser in interface MultiTenantUserManagerpublic void deleteUser(DocumentModel userModel, DocumentModel context)
MultiTenantUserManagerdeleteUser in interface MultiTenantUserManagerpublic void deleteUser(String userId, DocumentModel context)
MultiTenantUserManagerdeleteUser in interface MultiTenantUserManagerpublic void updateGroup(DocumentModel groupModel, DocumentModel context)
MultiTenantUserManagerupdateGroup in interface MultiTenantUserManagerpublic void deleteGroup(DocumentModel groupModel, DocumentModel context)
MultiTenantUserManagerdeleteGroup in interface MultiTenantUserManagerpublic void deleteGroup(String groupId, DocumentModel context)
MultiTenantUserManagerdeleteGroup in interface MultiTenantUserManagerpublic List<String> getGroupsInGroup(String parentId, DocumentModel context)
MultiTenantUserManagergetGroupsInGroup in interface MultiTenantUserManagerparentId - the name of the parent group.public List<String> getTopLevelGroups(DocumentModel context)
MultiTenantUserManagergetTopLevelGroups in interface MultiTenantUserManagerpublic List<String> getUsersInGroupAndSubGroups(String groupId, DocumentModel context)
MultiTenantUserManagergetUsersInGroupAndSubGroups in interface MultiTenantUserManagergroupId - ID of the grouppublic String[] getUsersForPermission(String perm, ACP acp, DocumentModel context)
MultiTenantUserManagergetUsersForPermission in interface MultiTenantUserManagerperm - the permissionacp - The access control policy of the documentpublic List<String> getAncestorGroups(String groupId)
UserManagergetAncestorGroups in interface UserManagerprotected void populateAncestorGroups(String groupId, List<String> ancestorGroups)
public GroupConfig getGroupConfig()
UserManagerGroupConfig.getGroupConfig in interface UserManagerpublic void handleEvent(Event event)
EventListenerhandleEvent in interface EventListenerCopyright © 2019 Nuxeo. All rights reserved.