Class DelegatingEntityDocsListGuard<O,S>

java.lang.Object
ch.tocco.nice2.security.api.AbstractListGuard
ch.tocco.nice2.dms.impl.security.guard.DelegatingEntityDocsListGuard<O,S>
All Implemented Interfaces:
ListGuard

public class DelegatingEntityDocsListGuard<O,S> extends AbstractListGuard
A ListGuard implementation that accepts Entity or EntityPath objects that may be from different models/paths. The object are grouped according to the given Function and then evaluated separately.
  • Field Details

  • Constructor Details

  • Method Details

    • getPrincipal

      public Principal getPrincipal()
    • getSecured

      public List<?> getSecured()
      Returns:
      The objects this guard is protecting.
    • evaluatePermissions

      public Guard.Decision[] evaluatePermissions(Permission permission)
      Description copied from interface: ListGuard
      Evaluates a permission. This method returns an Guard.Decision providing some more information about *why* a permission is granted or denied.
      Parameters:
      permission - The permission to evaluate.
      Returns:
      An Guard.Decision.
    • getSecurityContext

      public SecurityContext getSecurityContext()
    • toGuard

      public Guard toGuard()
      Description copied from interface: ListGuard
      Returns a Guard instance based on this ListGuard. This is only supported if this list guard contains exactly one object.