Class CQPermissions

java.lang.Object
com.adobe.cq.testing.client.security.Permissions
com.adobe.cq.testing.client.security.CQPermissions
Direct Known Subclasses:
ExtendedCQPermissions

public class CQPermissions extends Permissions
  • Field Summary

    Fields inherited from class com.adobe.cq.testing.client.security.Permissions

    client
  • Constructor Summary

    Constructors
    Constructor
    Description
    CQPermissions(T client)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JsonNode
    changePermissions(String authorizableId, String path, boolean read, boolean modify, boolean create, boolean delete, boolean acl_read, boolean acl_edit, boolean replicate, int... expectedStatus)
    Changes permissions for an authorizable.
    com.fasterxml.jackson.databind.JsonNode
    getPermissions(String authorizableId, String path, int depth, int... expectedStatus)
    Get permissions for an authorizable.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CQPermissions

      public CQPermissions(T client)
  • Method Details

    • changePermissions

      public com.fasterxml.jackson.databind.JsonNode changePermissions(String authorizableId, String path, boolean read, boolean modify, boolean create, boolean delete, boolean acl_read, boolean acl_edit, boolean replicate, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
      Changes permissions for an authorizable.
      Parameters:
      authorizableId - the authorizable id
      path - path
      read - read permission
      modify - modify permission
      create - createGroup permission
      delete - delete permission
      acl_read - read acl
      acl_edit - edit acl
      replicate - replication
      expectedStatus - list of allowed HTTP Status to be returned. If not set, http status 200 (OK) is assumed.
      Returns:
      Json node containing resulting permissions
      Throws:
      org.apache.sling.testing.clients.ClientException - If something fails during request/response cycle
    • getPermissions

      public com.fasterxml.jackson.databind.JsonNode getPermissions(String authorizableId, String path, int depth, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
      Get permissions for an authorizable.
      Parameters:
      authorizableId - the Id of the authorizable
      path - path
      depth - depth
      expectedStatus - list of allowed HTTP Status to be returned. If not set, http status 200 (OK) is assumed.
      Returns:
      the root JsonNode
      Throws:
      org.apache.sling.testing.clients.ClientException - If something fails during request/response cycle