Class CompositePermission

java.lang.Object
org.craftercms.commons.security.permissions.CompositePermission
All Implemented Interfaces:
Permission

public class CompositePermission extends Object implements Permission
Represents a permission that is a collection of other permissions. If any of the permissions evaluates to false, the final result will be false.
Author:
avasquez
  • Field Details

  • Constructor Details

    • CompositePermission

      public CompositePermission(Permission... permissions)
    • CompositePermission

      public CompositePermission(Collection<Permission> permissions)
  • Method Details

    • isAllowed

      public boolean isAllowed(String action)
      Description copied from interface: Permission
      Returns true if action execution is allowed
      Specified by:
      isAllowed in interface Permission
      Parameters:
      action - the action to execute
      Returns:
      true if action execution is allowed, false otherwise.