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.
- Author:
- Andrey Khayrutdinov, Nick Baker
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccess(RepositoryFile repositoryFile, EnumSet<RepositoryFilePermission> permissions) Returnstrueif the current user has access torepositoryFileby way of ACL node.getAclFor(RepositoryFile repositoryFile) Returns an ACL forrepositoryFile.voidremoveAclFor(RepositoryFile repositoryFile) Deletes the ACL node associated with therepositoryFileif it exists.voidsetAclFor(RepositoryFile repositoryFile, RepositoryFileAcl acl) SetsaclforrepositoryFile.
-
Method Details
-
canAccess
Returnstrueif the current user has access torepositoryFileby way of ACL node.- Parameters:
repositoryFile- file for which to check access by ACL nodepermissions- EnumSet of permissions to check against the repositoryFile- Returns:
trueif the user can access the Repository File governed by this ACL node
-
getAclFor
Returns an ACL forrepositoryFile. If none exists,nullis returned. Note: this method should be invoked with 'repository admin' privileges.- Parameters:
repositoryFile- file for which to retrieve ACLs for- Returns:
- ACL rules if exist or
nullotherwise
-
setAclFor
SetsaclforrepositoryFile. If a ACL node does not exist, it is created. Ifaclisnull, the ACL node is removed.- Parameters:
repositoryFile- data sourceacl- an ACL rules for the data source
-
removeAclFor
Deletes the ACL node associated with therepositoryFileif it exists.- Parameters:
repositoryFile- data source
-