Interface PrivilegeFactory

  • public interface PrivilegeFactory
    CQ 5.5
    Allows applications to create custom Privileges. Thus factories can create Privileges that implement custom rules to Privilege.isGranted(String) grant}. Factories are registred via SCR via providing this Interface as service.
    The Factories get a Privilege Store to delegate the management of their user-dependent configuration data.
    See Also:
    • Method Detail

      • handles

        Collection<String> handles()
        Explicitly declare the Privileges this Factor is able to create Privileges for.
        In case another Factory for one of the Privileges is already configured, registration of this Factory fails
        collections of the Privilege-ID this factory registers for
      • create

        Privilege create​(String privilegeId,
                         Authorizable authorizable,
                         PrivilegeStore store)
        The Factory creates an Privilege in any case.
        privilegeId - of the Privilege to create. must be contained in the set it handles
        authorizable - this privilege is created for
        store - containing configuration for the authorizable/privilege pair
        Privilege created for the Authorizable