Package de.xima.fc.user.access
Interface AccessChecker
-
public interface AccessCheckerInterface for checking access permissions for users.- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccessCheckResultcheckBackendAccess(AuthenticatedUser user)Checks if the given user has access to the backend.PermissionCheckResultcheckSystemPermission(SystemPermission permission, AuthenticatedUser user)Checks if the given user has the specified system permission.PermissionCheckResultcheckSystemPermission(SystemPermission permission, UserId userId)Checks if the user with the given ID has the specified system permission.AccessCheckResultcheckTenantBackendAccess(TenantId tenantId, AuthenticatedUser user)Checks if the given user has access to the backend of the specified tenant.AccessCheckResultcheckTenantBackendAccess(TenantId tenantId, UserId userId)Checks if the user with the given ID has access to the backend of the specified tenant.PermissionCheckResultcheckTenantPermission(TenantPermission permission, TenantId tenantId, AuthenticatedUser user)Checks if the given user has the specified tenant permission for the specified tenant.PermissionCheckResultcheckTenantPermission(TenantPermission permission, TenantId tenantId, UserId userId)Checks if the user with the given ID has the specified tenant permission for the specified tenant.MembershipResultcheckUserGroupMembership(AuthenticatedUser user, Set<UserGroupId> groupIds, String scope)Checks if the given user is member of ANY of the given user groups.
-
-
-
Method Detail
-
checkBackendAccess
AccessCheckResult checkBackendAccess(AuthenticatedUser user) throws FcIAMAccessException
Checks if the given user has access to the backend.- Parameters:
user- the authenticated user to check access for- Returns:
- a check result indicating whether the user has access to the backend
- Throws:
FcIAMAccessException- if the user profile for the user is not found or an error occurs while checking access permissionsIllegalArgumentException- if the provided user is null or invalid
-
checkSystemPermission
PermissionCheckResult checkSystemPermission(SystemPermission permission, UserId userId) throws FcIAMAccessException
Checks if the user with the given ID has the specified system permission.- Parameters:
permission- the system permission to checkuserId- the ID of the user to check the permission for- Returns:
- a check result indicating whether the user has the specified system permission
- Throws:
FcIAMAccessException- if the user profile for the user is not found or an error occurs while checking access permissionsIllegalArgumentException- if the provided permission or user is null or invalid
-
checkSystemPermission
PermissionCheckResult checkSystemPermission(SystemPermission permission, AuthenticatedUser user) throws FcIAMAccessException
Checks if the given user has the specified system permission.- Parameters:
permission- the system permission to checkuser- the authenticated user to check the permission for- Returns:
- a check result indicating whether the user has the specified system permission
- Throws:
FcIAMAccessException- if the user profile for the user is not found or an error occurs while checking access permissionsIllegalArgumentException- if the provided permission or user is null or invalid
-
checkTenantBackendAccess
AccessCheckResult checkTenantBackendAccess(TenantId tenantId, AuthenticatedUser user) throws FcIAMAccessException
Checks if the given user has access to the backend of the specified tenant.- Parameters:
tenantId- the ID of the tenant to check access foruser- the authenticated user to check access for- Returns:
- a check result indicating whether the user has access to the tenant backend
- Throws:
FcIAMAccessException- if the user profile for the user or the tenant is not found or if an error occurs while checking access permissionsIllegalArgumentException- if the provided tenant ID or user is null or invalid
-
checkTenantBackendAccess
AccessCheckResult checkTenantBackendAccess(TenantId tenantId, UserId userId) throws FcIAMAccessException
Checks if the user with the given ID has access to the backend of the specified tenant.- Parameters:
tenantId- the ID of the tenant to check access foruserId- the ID of the user to check access for- Returns:
- a check result indicating whether the user has access to the tenant backend
- Throws:
FcIAMAccessException- if the user profile for the user or the tenant is not found or if an error occurs while checking access permissionsIllegalArgumentException- if the provided tenant ID or user ID is null or invalid
-
checkTenantPermission
PermissionCheckResult checkTenantPermission(TenantPermission permission, TenantId tenantId, UserId userId) throws FcIAMAccessException
Checks if the user with the given ID has the specified tenant permission for the specified tenant.- Parameters:
permission- the tenant permission to checktenantId- the ID of the tenant to check the permission foruserId- the ID of the user to check the permission for- Returns:
- a check result indicating whether the user has the specified tenant permission for the specified tenant
- Throws:
FcIAMAccessException- if the user profile for the user or the tenant is not found or if an error occurs while checking access permissionsIllegalArgumentException- if the provided permission, tenant ID, or user ID is null or invalid
-
checkTenantPermission
PermissionCheckResult checkTenantPermission(TenantPermission permission, TenantId tenantId, AuthenticatedUser user) throws FcIAMAccessException
Checks if the given user has the specified tenant permission for the specified tenant.- Parameters:
permission- the tenant permission to checktenantId- the ID of the tenant to check the permission foruser- the authenticated user to check the permission for- Returns:
- a check result indicating whether the user has the specified tenant permission for the specified tenant
- Throws:
FcIAMAccessException- if the user profile for the user or the tenant is not found or if an error occurs while checking access permissionsIllegalArgumentException- if the provided permission, tenant ID, or user is null or invalid
-
checkUserGroupMembership
MembershipResult checkUserGroupMembership(AuthenticatedUser user, Set<UserGroupId> groupIds, String scope) throws FcIAMAccessException
Checks if the given user is member of ANY of the given user groups.- Parameters:
user- the user to check group membership forgroupIds- the IDs of the user groups to check againstscope- the scope to check group membership in- Returns:
- a check result indicating whether the user is member of ANY of the specified groups
- Throws:
FcIAMAccessException- if the user profile for the user is not found or if an error occurs while checking access permissionsIllegalArgumentException- if the provided user, group IDs, or scope is null or invalid- Since:
- 8.5.4
-
-