Class PredicateAccessControl

All Implemented Interfaces:
Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent, AccessControl

public class PredicateAccessControl extends AbstractIdentifiableInitializableComponent implements AccessControl
Access control implementation based on a predicate over a ProfileRequestContext.

To bridge the two designs, this adapter populates an AccessControlContext placed beneath the ProfileRequestContext to carry the operation and resource parameters and allow access to them from the Predicate.

Since:
3.3.0
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • predicate

      @Nonnull private final Predicate<ProfileRequestContext> predicate
      The predicate to use.
  • Constructor Details

  • Method Details

    • checkAccess

      public boolean checkAccess(@Nonnull javax.servlet.ServletRequest request, @Nullable String operation, @Nullable String resource)
      Specified by:
      checkAccess in interface AccessControl
    • getLogPrefix

      @Nonnull private String getLogPrefix()
      Get logging prefix.
      Returns:
      prefix