Interface GroupPermissionEvaluator
public interface GroupPermissionEvaluator
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanList()Returnstrueif the caller has at least one ofAdminRoles.QUERY_GROUPS,AdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles.booleanReturnstrueif the caller hasAdminRoles.MANAGE_USERSrole.booleancanManage(GroupModel group) Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole.booleancanManageMembers(GroupModel group) Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole.booleancanManageMembership(GroupModel group) Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole.booleancanView()booleancanView(GroupModel group) booleancanViewMembers(GroupModel group) getAccess(GroupModel group) Returns Map with information what access the caller for the provided group has.IfUserPermissionEvaluator.canView()evaluates totrue, returns empty set.voidThrows ForbiddenException ifcanList()returnsfalse.voidThrows ForbiddenException ifcanManage()returnsfalse.voidrequireManage(GroupModel group) Throws ForbiddenException ifcanManage(GroupModel)returnsfalse.voidrequireManageMembers(GroupModel group) Throws ForbiddenException ifcanManageMembership(GroupModel)returnsfalse.voidThrows ForbiddenException ifcanManageMembership(GroupModel)returnsfalse.voidThrows ForbiddenException ifcanView()returnsfalse.voidrequireView(GroupModel group) Throws ForbiddenException ifcanView(GroupModel)returnsfalse.voidrequireViewMembers(GroupModel group) Throws ForbiddenException ifcanViewMembers(GroupModel)returnsfalse.
-
Method Details
-
canList
boolean canList()Returnstrueif the caller has at least one ofAdminRoles.QUERY_GROUPS,AdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles. For V2 only: Also if it has a permission toAdminPermissionsSchema.VIEWorAdminPermissionsSchema.MANAGEgroups. -
requireList
void requireList()Throws ForbiddenException ifcanList()returnsfalse. -
canManage
Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole. Or if it has a permission toAdminPermissionsSchema.MANAGEthe group. -
requireManage
Throws ForbiddenException ifcanManage(GroupModel)returnsfalse. -
canView
Returnstrueif the caller has one ofAdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles. Or if it has a permission toAdminPermissionsSchema.VIEWthe group. -
requireView
Throws ForbiddenException ifcanView(GroupModel)returnsfalse. -
canManage
boolean canManage()Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole. For V2 only: Also if it has permission toAdminPermissionsSchema.MANAGEgroups. -
requireManage
void requireManage()Throws ForbiddenException ifcanManage()returnsfalse. -
canView
boolean canView()Returnstrueif the caller has one ofAdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles. Or if it has a permission toAdminPermissionsSchema.VIEWgroups. -
requireView
void requireView()Throws ForbiddenException ifcanView()returnsfalse. -
requireViewMembers
Throws ForbiddenException ifcanViewMembers(GroupModel)returnsfalse. -
canManageMembers
Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole. Or if it has a permission toAdminPermissionsSchema.MANAGE_MEMBERSof the group. -
canManageMembership
Returnstrueif the caller hasAdminRoles.MANAGE_USERSrole. Or if it has a permission toAdminPermissionsSchema.MANAGE_MEMBERSHIPof the group. -
canViewMembers
Returnstrueif the caller has one ofAdminRoles.MANAGE_USERSorAdminRoles.VIEW_USERSroles. Or if it has a permission toAdminPermissionsSchema.VIEW_MEMBERSof the group. -
requireManageMembership
Throws ForbiddenException ifcanManageMembership(GroupModel)returnsfalse. -
requireManageMembers
Throws ForbiddenException ifcanManageMembership(GroupModel)returnsfalse. -
getAccess
Returns Map with information what access the caller for the provided group has. -
getGroupIdsWithViewPermission
IfUserPermissionEvaluator.canView()evaluates totrue, returns empty set.- Returns:
- Stream of IDs of groups with view permission.
-