Class ACL

java.lang.Object
com.netscape.cms.authorization.ACL
All Implemented Interfaces:
Serializable

public class ACL extends Object implements Serializable
A class represents an access control list (ACL). An ACL is associated with an protected resources. The policy enforcer can verify the ACLs with the current context to see if the corresponding resource is accessible. An ACL may contain one or more ACLEntry. However, in case of multiple ACLEntry , a subject must pass ALL of the ACLEntry evaluation for permission to be granted
See Also:
  • Field Details

  • Method Details

    • merge

      public void merge(ACL other)
      Merge the rules of the other ACL into this one.
      Throws:
      IllegalArgumentException - if the ACLs do not have the same name.
    • getName

      public String getName()
      Retrieves the name of the resource governed by this access control.
      Returns:
      name of the resource
    • getResourceACLs

      public Iterable<String> getResourceACLs()
      Retrieve an iterable of strings that were used to produce this ACL.
      Returns:
      Iterable of formatted ACLs
    • getDescription

      public String getDescription()
      Retrieves the description of the resource governed by this access control.
      Returns:
      Description of the protected resource
    • entries

      public Enumeration<ACLEntry> entries()
      Returns ACL entries.
      Returns:
      enumeration for the ACLEntry vector
    • toString

      public String toString()
      Returns the string reprsentation.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the ACL entries in the following format:
    • checkRight

      public boolean checkRight(String permission)
      Tells if the permission is one of the defined "rights"
      Parameters:
      permission - permission to be checked
      Returns:
      true if it's one of the "rights"; false otherwise
    • rights

      public Enumeration<String> rights()
      Returns rights entries.
      Returns:
      enumeration of rights defined for this ACL
    • parseACL

      public static ACL parseACL(String resACLs) throws EACLsException
      Parse ACL resource attributes
      Parameters:
      resACLs - same format as the resourceACLs attribute:
      Returns:
      an ACL instance built from the parsed resACLs
      Throws:
      EACLsException - ACL related parsing errors for resACLs