Interface ClientPermissionEvaluator
- All Known Implementing Classes:
ClientPermissionsV2
public interface ClientPermissionEvaluator
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canConfigure
(ClientModel client) boolean
canList()
boolean
boolean
Returnstrue
if the caller hasAdminRoles.MANAGE_CLIENTS
role.boolean
canManage
(ClientModel client) Returnstrue
if the caller hasAdminRoles.MANAGE_CLIENTS
role.boolean
canManage
(ClientScopeModel clientScope) Returnstrue
if the caller hasAdminRoles.MANAGE_CLIENTS
role.boolean
Returnstrue
if the caller hasAdminRoles.MANAGE_CLIENTS
role.boolean
canMapClientScopeRoles
(ClientModel client) Returnstrue
if the caller has a permission toClientPermissionManagement.MAP_ROLES_CLIENT_SCOPE
for the client.boolean
canMapCompositeRoles
(ClientModel client) Returnstrue
if the caller has a permission toClientPermissionManagement.MAP_ROLES_COMPOSITE_SCOPE
for the client.boolean
canMapRoles
(ClientModel client) Returnstrue
if the caller has a permission toClientPermissionManagement.MAP_ROLES_SCOPE
for the client.boolean
canView()
Returnstrue
if the caller has at least one of theAdminRoles.MANAGE_CLIENTS
orAdminRoles.VIEW_CLIENTS
roles.boolean
canView
(ClientModel client) boolean
canView
(ClientScopeModel clientScope) Returnstrue
if the caller has at least one of theAdminRoles.VIEW_CLIENTS
orAdminRoles.MANAGE_CLIENTS
roles.boolean
getAccess
(ClientModel client) getClientsWithPermission
(String scope) boolean
isPermissionsEnabled
(ClientModel client) void
requireConfigure
(ClientModel client) Throws ForbiddenException ifcanConfigure(ClientModel)
returnsfalse
.void
Throws ForbiddenException ifcanList()
returnsfalse
.void
Throws ForbiddenException ifcanListClientScopes()
returnsfalse
.void
Throws ForbiddenException ifcanManage()
returnsfalse
.void
requireManage
(ClientModel client) Throws ForbiddenException ifcanManage(ClientModel)
returnsfalse
.void
requireManage
(ClientScopeModel clientScope) Throws ForbiddenException ifcanManage(ClientScopeModel)
returnsfalse
.void
Throws ForbiddenException ifcanManageClientScopes()
returnsfalse
.void
void
requireView
(ClientModel client) Throws ForbiddenException ifcanView(ClientModel)
returnsfalse
.void
requireView
(ClientScopeModel clientScope) Throws ForbiddenException ifcanView(ClientScopeModel)
returnsfalse
.void
void
setPermissionsEnabled
(ClientModel client, boolean enable)
-
Method Details
-
isPermissionsEnabled
-
setPermissionsEnabled
-
requireListClientScopes
void requireListClientScopes()Throws ForbiddenException ifcanListClientScopes()
returnsfalse
. -
canManage
boolean canManage()Returnstrue
if the caller hasAdminRoles.MANAGE_CLIENTS
role. For V2 only: Also if it has permission toAdminPermissionsSchema.MANAGE
. -
requireManage
void requireManage()Throws ForbiddenException ifcanManage()
returnsfalse
. -
canManageClientScopes
boolean canManageClientScopes()Returnstrue
if the caller hasAdminRoles.MANAGE_CLIENTS
role. For V2 only: Also if it has permission toAdminPermissionsSchema.MANAGE
. -
requireManageClientScopes
void requireManageClientScopes()Throws ForbiddenException ifcanManageClientScopes()
returnsfalse
. -
canView
boolean canView()Returnstrue
if the caller has at least one of theAdminRoles.MANAGE_CLIENTS
orAdminRoles.VIEW_CLIENTS
roles. For V2 only: Also if it has permission toAdminPermissionsSchema.VIEW
. -
canList
boolean canList()Returnstrue
ifcanView()
returnstrue
. Or if the caller has at least one of theAdminRoles.QUERY_CLIENTS
orAdminRoles.QUERY_USERS
roles. -
canViewClientScopes
boolean canViewClientScopes() -
requireList
void requireList()Throws ForbiddenException ifcanList()
returnsfalse
. -
canListClientScopes
boolean canListClientScopes() -
requireView
void requireView() -
requireViewClientScopes
void requireViewClientScopes() -
canManage
Returnstrue
if the caller hasAdminRoles.MANAGE_CLIENTS
role. Or if the caller has a permission toAdminPermissionManagement.MANAGE_SCOPE
the client. For V2 only: Also if the caller has a permission toAdminPermissionsSchema.MANAGE
all clients. -
canConfigure
Returnstrue
ifcanManage(ClientModel)
returnstrue
. Or if the caller has a permission toClientPermissionManagement.CONFIGURE_SCOPE
the client. For V2 only: Also if the caller has a permission toAdminPermissionsSchema.CONFIGURE
all clients. -
requireConfigure
Throws ForbiddenException ifcanConfigure(ClientModel)
returnsfalse
. -
requireManage
Throws ForbiddenException ifcanManage(ClientModel)
returnsfalse
. -
canView
Returnstrue
ifcanView()
orcanConfigure(ClientModel)
returnstrue
. Or if the caller has a permission toAdminPermissionManagement.VIEW_SCOPE
the client. For V2 only: Also if the caller has a permission toAdminPermissionsSchema.VIEW
all clients. -
requireView
Throws ForbiddenException ifcanView(ClientModel)
returnsfalse
. -
canManage
Returnstrue
if the caller hasAdminRoles.MANAGE_CLIENTS
role. For V2 only: Also if it has permission toAdminPermissionsSchema.MANAGE
. -
requireManage
Throws ForbiddenException ifcanManage(ClientScopeModel)
returnsfalse
. -
canView
Returnstrue
if the caller has at least one of theAdminRoles.VIEW_CLIENTS
orAdminRoles.MANAGE_CLIENTS
roles. For V2 only: Also if it has permission toAdminPermissionsSchema.VIEW
orAdminPermissionsSchema.MANAGE
. -
requireView
Throws ForbiddenException ifcanView(ClientScopeModel)
returnsfalse
. -
canMapRoles
Returnstrue
if the caller has a permission toClientPermissionManagement.MAP_ROLES_SCOPE
for the client. For V2 only: Also if the caller has a permission toAdminPermissionsSchema.MAP_ROLES
for all clients. -
canMapCompositeRoles
Returnstrue
if the caller has a permission toClientPermissionManagement.MAP_ROLES_COMPOSITE_SCOPE
for the client. For V2 only: Also if the caller has a permission toAdminPermissionsSchema.MAP_ROLES_COMPOSITE
for all clients. -
canMapClientScopeRoles
Returnstrue
if the caller has a permission toClientPermissionManagement.MAP_ROLES_CLIENT_SCOPE
for the client. For V2 only: Also if the caller has a permission toAdminPermissionsSchema.MAP_ROLES_CLIENT_SCOPE
for all clients. -
getAccess
-
getClientsWithPermission
-