Interface AccessChecker


  • public interface AccessChecker
    Interface for checking access permissions for users.
    Since:
    8.5.0
    Author:
    Norman Lorenz
    • 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 permissions
        IllegalArgumentException - 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 check
        userId - 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 permissions
        IllegalArgumentException - 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 check
        user - 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 permissions
        IllegalArgumentException - 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 for
        user - 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 permissions
        IllegalArgumentException - 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 for
        userId - 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 permissions
        IllegalArgumentException - 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 check
        tenantId - the ID of the tenant to check the permission for
        userId - 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 permissions
        IllegalArgumentException - 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 check
        tenantId - the ID of the tenant to check the permission for
        user - 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 permissions
        IllegalArgumentException - 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 for
        groupIds - the IDs of the user groups to check against
        scope - 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 permissions
        IllegalArgumentException - if the provided user, group IDs, or scope is null or invalid
        Since:
        8.5.4