Class UserDirectoryUtils

java.lang.Object
org.opencastproject.userdirectory.utils.UserDirectoryUtils

public final class UserDirectoryUtils extends Object
Utility class for common operations. This class is not visible to other OSGI bundles.
  • Method Details

    • isCurrentUserAuthorizedHandleRoles

      public static boolean isCurrentUserAuthorizedHandleRoles(SecurityService securityService, Set<Role> roles)
      Return false if the current user hasn't an admin role and the roles list contain same role, true otherwise
      Parameters:
      securityService - the SecurityService
      roles - roles list to test
      Returns:
      true if the roles list doesn't contain an admin role or if the current user is allowed to create, update or delete users or groups with the given roles