Interface UserPermissionEvaluator
public interface UserPermissionEvaluator
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the caller has theImpersonationConstants#IMPERSONATION_ROLE.booleancanImpersonate(UserModel user, ClientModel requester) Returnstrueif the caller has theImpersonationConstants#IMPERSONATION_ROLE.booleanReturnstrueif the caller hasAdminRoles.MANAGE_USERSrole.booleanReturnstrueif the caller hasAdminRoles.MANAGE_USERSrole.booleanReturnstrueif the caller hasAdminRoles.MANAGE_USERSrole.booleancanMapRoles(UserModel user) Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole.booleancanQuery()Returnstrueif the caller has at least one ofAdminRoles.QUERY_USERS,AdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles.default booleancanResetPassword(UserModel user) Returnstrueif the caller has permission toAdminPermissionsSchema.RESET_PASSWORDfor the given user.booleancanView()booleanReturnstrueif the caller has at least one ofAdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles.Returns Map with information what access the caller for the provided user has.getAccessForListing(UserModel user) Returns Map with information what access the caller for the provided user has when listing users.voidgrantIfNoPermission(boolean grantIfNoPermission) Deprecated.booleanisImpersonatable(UserModel user, ClientModel requester) Deprecated.voidrequireImpersonate(UserModel user) Throws ForbiddenException ifcanImpersonate(UserModel, ClientModel)returnsfalse.voidThrows ForbiddenException ifcanManage()returnsfalse.voidrequireManage(UserModel user) Throws ForbiddenException ifcanManage(UserModel)returnsfalse.voidThrows ForbiddenException ifcanManageGroupMembership(UserModel)returnsfalse.voidrequireMapRoles(UserModel user) Throws ForbiddenException ifcanMapRoles(UserModel)returnsfalse.voidThrows ForbiddenException ifcanQuery()returnsfalse.default voidThrows ForbiddenException ifcanResetPassword(UserModel)returnsfalse.voidThrows ForbiddenException ifcanView()returnsfalse.voidrequireView(UserModel user) Throws ForbiddenException ifcanView(UserModel)returnsfalse.
-
Method Details
-
requireManage
void requireManage()Throws ForbiddenException ifcanManage()returnsfalse. -
requireManage
Throws ForbiddenException ifcanManage(UserModel)returnsfalse. -
canManage
boolean canManage()Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole. Or if it has a permission toAdminPermissionsSchema.MANAGEusers. -
canManage
Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole. Or if it has a permission toAdminPermissionsSchema.MANAGEthe user. Or if it has a permission toAdminPermissionsSchema.MANAGE_MEMBERSof the group chain the user is associated with. -
requireResetPassword
Throws ForbiddenException ifcanResetPassword(UserModel)returnsfalse. -
canResetPassword
Returnstrueif the caller has permission toAdminPermissionsSchema.RESET_PASSWORDfor the given user. Default implementation falls back tocanManage(UserModel)for backward compatibility. -
requireQuery
void requireQuery()Throws ForbiddenException ifcanQuery()returnsfalse. -
canQuery
boolean canQuery()Returnstrueif the caller has at least one ofAdminRoles.QUERY_USERS,AdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles. Or if it has a permission toAdminPermissionsSchema.VIEWusers. -
requireView
void requireView()Throws ForbiddenException ifcanView()returnsfalse. -
requireView
Throws ForbiddenException ifcanView(UserModel)returnsfalse. -
canView
boolean canView()Returnstrueif the caller has one ofAdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles. Or if it has a permission toAdminPermissionsSchema.VIEWusers. -
canView
Returnstrueif the caller has at least one ofAdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles. Or if it has a permission toAdminPermissionsSchema.VIEWthe user. Or if it has a permission toAdminPermissionsSchema.VIEW_MEMBERSof the group chain the user is associated with. -
requireImpersonate
Throws ForbiddenException ifcanImpersonate(UserModel, ClientModel)returnsfalse. -
canImpersonate
boolean canImpersonate()Returnstrueif the caller has theImpersonationConstants#IMPERSONATION_ROLE. Or if it has a permission toAdminPermissionsSchema.IMPERSONATEusers. -
canImpersonate
Returnstrueif the caller has theImpersonationConstants#IMPERSONATION_ROLE. NOTE: If requester is provided, it's clientId is added to evaluation context. Or if it has a permission toAdminPermissionsSchema.IMPERSONATEthe user. -
getAccess
Returns Map with information what access the caller for the provided user has. -
getAccessForListing
Returns Map with information what access the caller for the provided user has when listing users. -
requireMapRoles
Throws ForbiddenException ifcanMapRoles(UserModel)returnsfalse. -
canMapRoles
Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole. Or if it has a permission toAdminPermissionsSchema.MAP_ROLESof the user. -
requireManageGroupMembership
Throws ForbiddenException ifcanManageGroupMembership(UserModel)returnsfalse. -
canManageGroupMembership
Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole. Or if it has a permission toAdminPermissionsSchema.MANAGE_GROUP_MEMBERSHIPof the user. -
isImpersonatable
Deprecated. -
grantIfNoPermission
Deprecated.
-