public abstract static class PermissionBackend.ForProject extends PermissionBackend.AcceptsReviewDb<PermissionBackend.ForProject>
db
Constructor and Description |
---|
ForProject() |
Modifier and Type | Method and Description |
---|---|
PermissionBackend.ForChange |
change(ChangeData cd)
Returns an instance scoped for the change, and its destination ref and project.
|
PermissionBackend.ForChange |
change(ChangeNotes notes)
Returns an instance scoped for the change, and its destination ref and project.
|
abstract void |
check(ProjectPermission perm)
Verify scoped user can
perm , throwing if denied. |
abstract java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> |
filter(java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> refs,
org.eclipse.jgit.lib.Repository repo,
PermissionBackend.RefFilterOptions opts)
Filter a map of references by visibility.
|
PermissionBackend.ForChange |
indexedChange(ChangeData cd,
ChangeNotes notes)
Returns an instance scoped for the change loaded from index, and its destination ref and
project.
|
abstract PermissionBackend.ForRef |
ref(java.lang.String ref)
Returns an instance scoped for
ref in this project. |
abstract java.lang.String |
resourcePath()
Returns the fully qualified resource path that this instance is scoped to.
|
abstract java.util.Set<ProjectPermission> |
test(java.util.Collection<ProjectPermission> permSet)
Filter
permSet to permissions scoped user might be able to perform. |
boolean |
test(ProjectPermission perm) |
abstract BooleanCondition |
testCond(ProjectPermission perm) |
boolean |
testOrFalse(ProjectPermission perm) |
database, database
public abstract java.lang.String resourcePath()
public abstract PermissionBackend.ForRef ref(java.lang.String ref)
ref
in this project.public PermissionBackend.ForChange change(ChangeData cd)
public PermissionBackend.ForChange change(ChangeNotes notes)
public PermissionBackend.ForChange indexedChange(ChangeData cd, ChangeNotes notes)
public abstract void check(ProjectPermission perm) throws AuthException, PermissionBackendException
perm
, throwing if denied.public abstract java.util.Set<ProjectPermission> test(java.util.Collection<ProjectPermission> permSet) throws PermissionBackendException
permSet
to permissions scoped user might be able to perform.PermissionBackendException
public boolean test(ProjectPermission perm) throws PermissionBackendException
PermissionBackendException
public boolean testOrFalse(ProjectPermission perm)
public abstract BooleanCondition testCond(ProjectPermission perm)
public abstract java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> filter(java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> refs, org.eclipse.jgit.lib.Repository repo, PermissionBackend.RefFilterOptions opts) throws PermissionBackendException
refs
- a map of references to filter.repo
- an open Repository
handle for this instance's projectopts
- further options for filtering.PermissionBackendException
- if failure consulting backend configuration.