public abstract static class PermissionBackend.ForProject
extends java.lang.Object
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(CoreOrPluginProjectPermission perm)
Verify scoped user can
perm , throwing if denied. |
java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> |
filter(java.util.List<org.eclipse.jgit.lib.Ref> refs,
org.eclipse.jgit.lib.Repository repo,
PermissionBackend.RefFilterOptions opts)
Filter a list of references by visibility.
|
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 <T extends CoreOrPluginProjectPermission> |
test(java.util.Collection<T> permSet)
Filter
permSet to permissions scoped user might be able to perform. |
boolean |
test(CoreOrPluginProjectPermission perm) |
abstract BooleanCondition |
testCond(CoreOrPluginProjectPermission perm) |
boolean |
testOrFalse(CoreOrPluginProjectPermission perm) |
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(CoreOrPluginProjectPermission perm) throws AuthException, PermissionBackendException
perm
, throwing if denied.public abstract <T extends CoreOrPluginProjectPermission> java.util.Set<T> test(java.util.Collection<T> permSet) throws PermissionBackendException
permSet
to permissions scoped user might be able to perform.PermissionBackendException
public boolean test(CoreOrPluginProjectPermission perm) throws PermissionBackendException
PermissionBackendException
public boolean testOrFalse(CoreOrPluginProjectPermission perm)
public abstract BooleanCondition testCond(CoreOrPluginProjectPermission 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.public java.util.Map<java.lang.String,org.eclipse.jgit.lib.Ref> filter(java.util.List<org.eclipse.jgit.lib.Ref> refs, org.eclipse.jgit.lib.Repository repo, PermissionBackend.RefFilterOptions opts) throws PermissionBackendException
refs
- a list of references to filter.repo
- an open Repository
handle for this instance's projectopts
- further options for filtering.PermissionBackendException
- if failure consulting backend configuration.