Class AbstractBatchAccessChecker
- java.lang.Object
-
- org.projectnessie.services.authz.AbstractBatchAccessChecker
-
- All Implemented Interfaces:
BatchAccessChecker
public abstract class AbstractBatchAccessChecker extends java.lang.Object implements BatchAccessChecker
-
-
Field Summary
Fields Modifier and Type Field Description static BatchAccessCheckerNOOP_ACCESS_CHECKER
-
Constructor Summary
Constructors Constructor Description AbstractBatchAccessChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BatchAccessCheckercan(Check check)BatchAccessCheckercanAssignRefToHash(org.projectnessie.versioned.NamedRef ref)Checks whether the given role/principal is allowed to assign the givenBranch/Tagto a commit id.BatchAccessCheckercanCommitChangeAgainstReference(org.projectnessie.versioned.NamedRef ref)Checks whether the given role/principal is allowed to commit changes against the givenBranch/TagorDetached.BatchAccessCheckercanCreateEntity(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)Deprecated.BatchAccessCheckercanCreateReference(org.projectnessie.versioned.NamedRef ref)Checks whether the given role/principal is allowed to create aBranch/Tag.BatchAccessCheckercanDeleteEntity(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)Checks whether the given role/principal is allowed to delete an entity value as defined by theContentKeyfor the givenBranch, called for aOperation.Deleteoperation in a commit.BatchAccessCheckercanDeleteReference(org.projectnessie.versioned.NamedRef ref)Checks whether the given role/principal is allowed to delete aBranch/Tag.BatchAccessCheckercanListCommitLog(org.projectnessie.versioned.NamedRef ref)Checks whether the given role/principal is allowed to list the commit log for the givenBranch/TagorDetached.BatchAccessCheckercanReadContentKey(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)Called for every content-key about to be returned from, for example, a "get commit log" operation.BatchAccessCheckercanReadEntityValue(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)Checks whether the given role/principal is allowed to read an entity value as defined by theContentKeyfor the givenBranch/TagorDetached.BatchAccessCheckercanReadEntries(org.projectnessie.versioned.NamedRef ref)Checks whether the given role/principal is allowed to read entries content for the givenBranch/TagorDetached.BatchAccessCheckercanReadRepositoryConfig(org.projectnessie.model.RepositoryConfig.Type repositoryConfigType)BatchAccessCheckercanUpdateEntity(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)Deprecated.BatchAccessCheckercanUpdateRepositoryConfig(org.projectnessie.model.RepositoryConfig.Type repositoryConfigType)BatchAccessCheckercanViewReference(org.projectnessie.versioned.NamedRef ref)Checks whether the given role/principal is allowed to view/list the givenBranch/TagorDetached.protected java.util.Collection<Check>getChecks()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.projectnessie.services.authz.BatchAccessChecker
check, checkAndThrow
-
-
-
-
Field Detail
-
NOOP_ACCESS_CHECKER
public static final BatchAccessChecker NOOP_ACCESS_CHECKER
-
-
Method Detail
-
getChecks
protected java.util.Collection<Check> getChecks()
-
can
public BatchAccessChecker can(Check check)
- Specified by:
canin interfaceBatchAccessChecker
-
canViewReference
public BatchAccessChecker canViewReference(org.projectnessie.versioned.NamedRef ref)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to view/list the givenBranch/TagorDetached.- Specified by:
canViewReferencein interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto check
-
canCreateReference
public BatchAccessChecker canCreateReference(org.projectnessie.versioned.NamedRef ref)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to create aBranch/Tag.- Specified by:
canCreateReferencein interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto check
-
canAssignRefToHash
public BatchAccessChecker canAssignRefToHash(org.projectnessie.versioned.NamedRef ref)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to assign the givenBranch/Tagto a commit id.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canAssignRefToHashin interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto check not granted.
-
canDeleteReference
public BatchAccessChecker canDeleteReference(org.projectnessie.versioned.NamedRef ref)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to delete aBranch/Tag.- Specified by:
canDeleteReferencein interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto check
-
canReadEntries
public BatchAccessChecker canReadEntries(org.projectnessie.versioned.NamedRef ref)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to read entries content for the givenBranch/TagorDetached.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canReadEntriesin interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto check
-
canReadContentKey
public BatchAccessChecker canReadContentKey(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)
Description copied from interface:BatchAccessCheckerCalled for every content-key about to be returned from, for example, a "get commit log" operation.This is an additional check for each content-key. "Early" checks, that run before generating the result, like
BatchAccessChecker.canReadEntries(NamedRef)orBatchAccessChecker.canListCommitLog(NamedRef), run as well.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canReadContentKeyin interfaceBatchAccessChecker- Parameters:
ref- current referenceidentifiedKey- content key / ID / type to check
-
canListCommitLog
public BatchAccessChecker canListCommitLog(org.projectnessie.versioned.NamedRef ref)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to list the commit log for the givenBranch/TagorDetached.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canListCommitLogin interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto check
-
canCommitChangeAgainstReference
public BatchAccessChecker canCommitChangeAgainstReference(org.projectnessie.versioned.NamedRef ref)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to commit changes against the givenBranch/TagorDetached.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canCommitChangeAgainstReferencein interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto check
-
canReadEntityValue
public BatchAccessChecker canReadEntityValue(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to read an entity value as defined by theContentKeyfor the givenBranch/TagorDetached.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canReadEntityValuein interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto checkidentifiedKey- content key / ID / type to check
-
canCreateEntity
@Deprecated public BatchAccessChecker canCreateEntity(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)
Deprecated.Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to create a new entity value as defined by theIdentifiedContentKeyfor the givenBranch, called for aOperation.Putoperation in a commit.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canCreateEntityin interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto checkidentifiedKey- content key / ID / type to check
-
canUpdateEntity
@Deprecated public BatchAccessChecker canUpdateEntity(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)
Deprecated.Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to update an existing entity value as defined by theIdentifiedContentKeyfor the givenBranch, called for aOperation.Putoperation in a commit.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canUpdateEntityin interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto checkidentifiedKey- content key / ID / type to check
-
canDeleteEntity
public BatchAccessChecker canDeleteEntity(org.projectnessie.versioned.NamedRef ref, org.projectnessie.model.IdentifiedContentKey identifiedKey)
Description copied from interface:BatchAccessCheckerChecks whether the given role/principal is allowed to delete an entity value as defined by theContentKeyfor the givenBranch, called for aOperation.Deleteoperation in a commit.Adds an implicit
BatchAccessChecker.canViewReference(NamedRef).- Specified by:
canDeleteEntityin interfaceBatchAccessChecker- Parameters:
ref- TheNamedRefto checkidentifiedKey- content key / ID / type to check
-
canReadRepositoryConfig
public BatchAccessChecker canReadRepositoryConfig(org.projectnessie.model.RepositoryConfig.Type repositoryConfigType)
- Specified by:
canReadRepositoryConfigin interfaceBatchAccessChecker
-
canUpdateRepositoryConfig
public BatchAccessChecker canUpdateRepositoryConfig(org.projectnessie.model.RepositoryConfig.Type repositoryConfigType)
- Specified by:
canUpdateRepositoryConfigin interfaceBatchAccessChecker
-
-