Interface UserPermissionEvaluator
public interface UserPermissionEvaluator
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the caller has theImpersonationConstants.IMPERSONATION_ROLE
.boolean
canImpersonate
(UserModel user, ClientModel requester) Returnstrue
if the caller has theImpersonationConstants.IMPERSONATION_ROLE
.boolean
Returnstrue
if the caller hasAdminRoles.MANAGE_USERS
role.boolean
Returnstrue
if the caller hasAdminRoles.MANAGE_USERS
role.boolean
Returnstrue
if the caller hasAdminRoles.MANAGE_USERS
role.boolean
canMapRoles
(UserModel user) Returnstrue
if the caller hasAdminRoles.MANAGE_USERS
role.boolean
canQuery()
Returnstrue
if the caller has at least one ofAdminRoles.QUERY_USERS
,AdminRoles.MANAGE_USERS
orAdminRoles.VIEW_USERS
roles.boolean
canView()
boolean
Returnstrue
if the caller has at least one ofAdminRoles.MANAGE_USERS
orAdminRoles.VIEW_USERS
roles.Returns Map with information what access the caller for the provided user has.void
grantIfNoPermission
(boolean grantIfNoPermission) boolean
isImpersonatable
(UserModel user, ClientModel requester) Deprecated.void
requireImpersonate
(UserModel user) Throws ForbiddenException ifcanImpersonate(UserModel, ClientModel)
returnsfalse
.void
Throws ForbiddenException ifcanManage()
returnsfalse
.void
requireManage
(UserModel user) Throws ForbiddenException ifcanManage(UserModel)
returnsfalse
.void
Throws ForbiddenException ifcanManageGroupMembership(UserModel)
returnsfalse
.void
requireMapRoles
(UserModel user) Throws ForbiddenException ifcanMapRoles(UserModel)
returnsfalse
.void
Throws ForbiddenException ifcanQuery()
returnsfalse
.void
Throws ForbiddenException ifcanView()
returnsfalse
.void
requireView
(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()Returnstrue
if the caller hasAdminRoles.MANAGE_USERS
role. Or if it has a permission toAdminPermissionsSchema.MANAGE
users. -
canManage
Returnstrue
if the caller hasAdminRoles.MANAGE_USERS
role. Or if it has a permission toAdminPermissionsSchema.MANAGE
the user. Or if it has a permission toAdminPermissionsSchema.MANAGE_MEMBERS
of the group chain the user is associated with. -
requireQuery
void requireQuery()Throws ForbiddenException ifcanQuery()
returnsfalse
. -
canQuery
boolean canQuery()Returnstrue
if the caller has at least one ofAdminRoles.QUERY_USERS
,AdminRoles.MANAGE_USERS
orAdminRoles.VIEW_USERS
roles. Or if it has a permission toAdminPermissionsSchema.VIEW
orAdminPermissionsSchema.MANAGE
users. -
requireView
void requireView()Throws ForbiddenException ifcanView()
returnsfalse
. -
requireView
Throws ForbiddenException ifcanView(UserModel)
returnsfalse
. -
canView
boolean canView()Returnstrue
if the caller has one ofAdminRoles.MANAGE_USERS
orAdminRoles.VIEW_USERS
roles. Or if it has a permission toAdminPermissionsSchema.VIEW
orAdminPermissionsSchema.MANAGE
users. -
canView
Returnstrue
if the caller has at least one ofAdminRoles.MANAGE_USERS
orAdminRoles.VIEW_USERS
roles. Or if it has a permission toAdminPermissionsSchema.VIEW
orAdminPermissionsSchema.MANAGE
the user. Or if it has a permission toAdminPermissionsSchema.VIEW_MEMBERS
of the group chain the user is associated with. -
requireImpersonate
Throws ForbiddenException ifcanImpersonate(UserModel, ClientModel)
returnsfalse
. -
canImpersonate
boolean canImpersonate()Returnstrue
if the caller has theImpersonationConstants.IMPERSONATION_ROLE
. Or if it has a permission toAdminPermissionsSchema.IMPERSONATE
users. -
canImpersonate
Returnstrue
if 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.IMPERSONATE
the user. -
getAccess
Returns Map with information what access the caller for the provided user has. -
requireMapRoles
Throws ForbiddenException ifcanMapRoles(UserModel)
returnsfalse
. -
canMapRoles
Returnstrue
if the caller hasAdminRoles.MANAGE_USERS
role. Or if it has a permission toAdminPermissionsSchema.MANAGE
the user orAdminPermissionsSchema.MAP_ROLES
of the user. Or if it has a permission toAdminPermissionsSchema.MANAGE_MEMBERS
of the group chain the user is associated with. -
requireManageGroupMembership
Throws ForbiddenException ifcanManageGroupMembership(UserModel)
returnsfalse
. -
canManageGroupMembership
Returnstrue
if the caller hasAdminRoles.MANAGE_USERS
role. Or if it has a permission toAdminPermissionsSchema.MANAGE
the user orAdminPermissionsSchema.MANAGE_GROUP_MEMBERSHIP
of the user. Or if it has a permission toAdminPermissionsSchema.MANAGE_MEMBERS
of the group chain the user is associated with. -
isImpersonatable
Deprecated. -
grantIfNoPermission
void grantIfNoPermission(boolean grantIfNoPermission)
-