Class CustomRoleProvider

java.lang.Object
org.opencastproject.userdirectory.CustomRoleProvider
All Implemented Interfaces:
org.opencastproject.security.api.RoleProvider

public class CustomRoleProvider extends Object implements org.opencastproject.security.api.RoleProvider
An in-memory role provider containing administratively-defined custom roles
  • Field Details

    • CUSTOM_ROLES_KEY

      public static final String CUSTOM_ROLES_KEY
      Configuration key for the custom role list
      See Also:
    • CUSTOM_ROLES_PATTERN_KEY

      public static final String CUSTOM_ROLES_PATTERN_KEY
      Configuration key for the custom role pattern
      See Also:
    • securityService

      protected org.opencastproject.security.api.SecurityService securityService
      The security service
  • Constructor Details

    • CustomRoleProvider

      public CustomRoleProvider()
  • Method Details

    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      Parameters:
      securityService - the securityService to set
    • activate

      protected void activate(org.osgi.service.component.ComponentContext cc)
      Callback to activate the component.
      Parameters:
      cc - the declarative services component context
    • getOrganization

      public String getOrganization()
      Specified by:
      getOrganization in interface org.opencastproject.security.api.RoleProvider
      See Also:
      • UserProvider.getOrganization()
    • getRolesForUser

      public List<org.opencastproject.security.api.Role> getRolesForUser(String userName)
      Specified by:
      getRolesForUser in interface org.opencastproject.security.api.RoleProvider
      See Also:
      • RoleProvider.getRolesForUser(String)
    • findRoles

      public Iterator<org.opencastproject.security.api.Role> findRoles(String query, org.opencastproject.security.api.Role.Target target, int offset, int limit)
      Specified by:
      findRoles in interface org.opencastproject.security.api.RoleProvider
      See Also:
      • RoleProvider.findRoles(String, Role.Target, int, int)