Class UserIdRoleProvider
java.lang.Object
org.opencastproject.userdirectory.UserIdRoleProvider
- All Implemented Interfaces:
RoleProvider,org.osgi.service.cm.ManagedService
public class UserIdRoleProvider
extends Object
implements RoleProvider, org.osgi.service.cm.ManagedService
The user id role provider assigns the user id role.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SecurityServiceThe security serviceprotected UserDirectoryServiceThe user directory service -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindRoles(String query, Role.Target target, int offset, int limit) Return the found roles as an iterator.Returns the identifier for the organization that is defining this set of roles.getRolesForUser(String userName) Returns the roles for this user or an empty array if no roles are applicable.static StringgetUserIdRole(String userName) static Stringstatic booleanvoidsetSecurityService(SecurityService securityService) voidsetUserDirectoryService(UserDirectoryService userDirectoryService) Sets the user directory servicevoidupdated(Dictionary properties)
-
Field Details
-
securityService
The security service -
userDirectoryService
The user directory service
-
-
Constructor Details
-
UserIdRoleProvider
public UserIdRoleProvider()
-
-
Method Details
-
setSecurityService
- Parameters:
securityService- the securityService to set
-
setUserDirectoryService
Sets the user directory service- Parameters:
userDirectoryService- the userDirectoryService to set
-
isSanitize
public static boolean isSanitize() -
getUserRolePrefix
-
getUserIdRole
-
getRolesForUser
Description copied from interface:RoleProviderReturns the roles for this user or an empty array if no roles are applicable.- Specified by:
getRolesForUserin interfaceRoleProvider- Parameters:
userName- the user id- Returns:
- the set of roles
- See Also:
-
getOrganization
Description copied from interface:RoleProviderReturns the identifier for the organization that is defining this set of roles.- Specified by:
getOrganizationin interfaceRoleProvider- Returns:
- the defining organization
- See Also:
-
findRoles
Description copied from interface:RoleProviderReturn the found roles as an iterator.- Specified by:
findRolesin interfaceRoleProvider- Parameters:
query- the query. Use the wildcards "_" to match any single character and "%" to match an arbitrary number of characters (including zero characters).offset- the offsetlimit- the limit. 0 means no limit- Returns:
- an iterator of role's
- See Also:
-
updated
- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService- Throws:
org.osgi.service.cm.ConfigurationException
-