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.
Modifier and Type | Method and Description |
---|---|
boolean |
canAccess(RepositoryFile repositoryFile,
EnumSet<RepositoryFilePermission> permissions)
Returns
true if the current user has access to repositoryFile by way of ACL node. |
RepositoryFileAcl |
getAclFor(RepositoryFile repositoryFile)
Returns an ACL for
repositoryFile . |
void |
removeAclFor(RepositoryFile repositoryFile)
Deletes the ACL node associated with the
repositoryFile if it exists. |
void |
setAclFor(RepositoryFile repositoryFile,
RepositoryFileAcl acl)
Sets
acl for repositoryFile . |
boolean canAccess(RepositoryFile repositoryFile, EnumSet<RepositoryFilePermission> permissions)
true
if the current user has access to repositoryFile
by way of ACL node.repositoryFile
- file for which to check access by ACL nodepermissions
- EnumSet of permissions to check against the repositoryFiletrue
if the user can access the Repository File governed by this ACL nodeRepositoryFileAcl getAclFor(RepositoryFile repositoryFile)
repositoryFile
. If none exists, null
is returned. Note: this
method should be invoked with 'repository admin' privileges.repositoryFile
- file for which to retrieve ACLs fornull
otherwisevoid setAclFor(RepositoryFile repositoryFile, RepositoryFileAcl acl)
acl
for repositoryFile
. If a ACL node does not exist, it is created. If acl
is
null
, the ACL node is removed.repositoryFile
- data sourceacl
- an ACL rules for the data sourcevoid removeAclFor(RepositoryFile repositoryFile)
repositoryFile
if it exists.repositoryFile
- data source