Interface DynamicAuthority

  • All Known Implementing Classes:
    LockOwnerDynamicAuthority, OwnerDynamicAuthority

    public interface DynamicAuthority
    The interface for a dynamic authority provider e.g. for the owner of a node or any other authority that is determined by the context rather than just a node.
    Author:
    Andy Hind
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getAuthority()
      If this authority is granted this method provides the string representation of the granted authority.
      boolean hasAuthority​(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String userName)
      Is this authority granted to the given user for this node ref?
      java.util.Set<PermissionReference> requiredFor()
      For what permission checks is this dynamic authority required? If null, it is required for all checks.
    • Method Detail

      • hasAuthority

        boolean hasAuthority​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                             java.lang.String userName)
        Is this authority granted to the given user for this node ref?
        Parameters:
        nodeRef - NodeRef
        userName - String
        Returns:
        true if the current user has the authority
      • getAuthority

        java.lang.String getAuthority()
        If this authority is granted this method provides the string representation of the granted authority.
        Returns:
        the authority taht may be assigned
      • requiredFor

        java.util.Set<PermissionReference> requiredFor()
        For what permission checks is this dynamic authority required? If null, it is required for all checks.
        Returns:
        the set of permissions for which this dynamic authority should be evaluated