Package org.keycloak.services
Class DefaultPermissions
java.lang.Object
org.keycloak.services.DefaultPermissions
- All Implemented Interfaces:
Permissions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasPermission(String resourceType, String scope) Returnstrueif the current user has permissions to perform an action on realm resources with the givenresourceTypeand with the givenscope.booleanhasPermission(Model model, String realmResourceType, String scope) Returnstrueif the current user has permissions to perform an action on a realm resource type with the given scopebooleanisAdminGroup(GroupModel group) Returnstrueif the given group has any admin role assigned, either directly, via parent groups, or via composite roles.booleanisAdminUser(UserModel user) Returnstrueif the given user has any admin role assigned, either directly, via group membership, or via composite roles.
-
Constructor Details
-
DefaultPermissions
-
-
Method Details
-
hasPermission
Description copied from interface:PermissionsReturnstrueif the current user has permissions to perform an action on realm resources with the givenresourceTypeand with the givenscope.- Specified by:
hasPermissionin interfacePermissions- Parameters:
resourceType- the realm resource typescope- the scope- Returns:
trueif the current user has permissions to perform an action on a realm resource type with the given scope,falseotherwise
-
hasPermission
Description copied from interface:PermissionsReturnstrueif the current user has permissions to perform an action on a realm resource type with the given scope- Specified by:
hasPermissionin interfacePermissionsrealmResourceType- the realm resource typescope- the scope- Returns:
trueif the current user has permissions to perform an action on a realm resource type with the given scope,falseotherwise
-
isAdminGroup
Description copied from interface:PermissionsReturnstrueif the given group has any admin role assigned, either directly, via parent groups, or via composite roles.- Specified by:
isAdminGroupin interfacePermissions- Parameters:
group- the group to check- Returns:
trueif the group has any admin role,falseotherwise
-
isAdminUser
Description copied from interface:PermissionsReturnstrueif the given user has any admin role assigned, either directly, via group membership, or via composite roles.- Specified by:
isAdminUserin interfacePermissions- Parameters:
user- the user to check- Returns:
trueif the user has any admin role,falseotherwise
-