Class UserDirectoryUtils
java.lang.Object
org.opencastproject.userdirectory.utils.UserDirectoryUtils
Utility class for common operations.
This class is not visible to other OSGI bundles.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisCurrentUserAuthorizedHandleRoles(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
-
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 SecurityServiceroles- 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
-