Interface IRepositoryAccessVoter


  • public interface IRepositoryAccessVoter
    Repository voter to add custom security to the repository. You should implement this interface if you need to create your custom security model. The voter is used as a part of the chain in which each voter checks if a file from repository can be accessed in scope of current request, taking into account user's details, the file itself and desired type of access.
    Author:
    rmansoor
    • Method Detail

      • hasAccess

        boolean hasAccess​(RepositoryFile file,
                          RepositoryFilePermission operation,
                          RepositoryFileAcl acl,
                          IPentahoSession session)
        Determines whether the user has access to perform a specific operation on a particular file in the repository. based on the list of effective authorities from the holder.
        Parameters:
        file - Parent folder or file.
        operation - Operation the user is trying to perform.
        acl - ACL of the folder/file where this operation is about to be performed.
        session - Hitachi Vantara session of the user.
        Returns:
        Returns true if the user has the requested access.