Interface AccessEvaluator

All Known Implementing Classes:
AccessEvaluator.Impl

public interface AccessEvaluator
The access evaluator.
Author:
Christian Bremer
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    The default access evaluator implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasPermission(AclUserContext userContext, String permission)
    Determines whether the given user with the given roles and groups has the specified permission.
    default boolean
    hasPermissions(AclUserContext userContext, AccessEvaluation accessEvaluation, Collection<String> permissions)
    Determines whether the given user with the given roles and groups has the specified permissions according to the given access evaluation type.
    of(Acl acl)
    Creates an access evaluator from the given access control list.
  • Method Details

    • of

      static AccessEvaluator of(Acl acl)
      Creates an access evaluator from the given access control list.
      Parameters:
      acl - the access control list
      Returns:
      the access evaluator
    • hasPermission

      boolean hasPermission(AclUserContext userContext, String permission)
      Determines whether the given user with the given roles and groups has the specified permission.
      Parameters:
      userContext - the user context
      permission - the permission
      Returns:
      true if the user has the permission, otherwise false
    • hasPermissions

      default boolean hasPermissions(AclUserContext userContext, AccessEvaluation accessEvaluation, Collection<String> permissions)
      Determines whether the given user with the given roles and groups has the specified permissions according to the given access evaluation type.
      Parameters:
      userContext - the user context
      accessEvaluation - the access evaluation type
      permissions - the permissions
      Returns:
      true if the user has the permissions, otherwise false