Interface IAclNodeHelper

  • public interface IAclNodeHelper

    The interface for operations over ACL nodes.

    Certain entities, such as data sources, are stored in areas of the repository in which non-admin users have no natural access. In order to provide ACLs on these entities surrogate nodes are created which store the ACLs instead. Implementations of this class are responsible for storing and querying these surrogate ACL nodes.

    Andrey Khayrutdinov, Nick Baker
    • Method Detail

      • canAccess

        boolean canAccess​(RepositoryFile repositoryFile,
                          EnumSet<RepositoryFilePermission> permissions)
        Returns true if the current user has access to repositoryFile by way of ACL node.
        repositoryFile - file for which to check access by ACL node
        permissions - EnumSet of permissions to check against the repositoryFile
        true if the user can access the Repository File governed by this ACL node
      • getAclFor

        RepositoryFileAcl getAclFor​(RepositoryFile repositoryFile)
        Returns an ACL for repositoryFile. If none exists, null is returned. Note: this method should be invoked with 'repository admin' privileges.
        repositoryFile - file for which to retrieve ACLs for
        ACL rules if exist or null otherwise
      • setAclFor

        void setAclFor​(RepositoryFile repositoryFile,
                       RepositoryFileAcl acl)
        Sets acl for repositoryFile. If a ACL node does not exist, it is created. If acl is null, the ACL node is removed.
        repositoryFile - data source
        acl - an ACL rules for the data source
      • removeAclFor

        void removeAclFor​(RepositoryFile repositoryFile)
        Deletes the ACL node associated with the repositoryFile if it exists.
        repositoryFile - data source