public final class PermissionScope extends Object
Permission
acts on and scoped to.
This abstraction primarily controls what permissions are configurable at what level.
For example, "create an item" is scoped to ItemGroup
in the sense that
it "acts" on the item group object (and therefore it won't make sense to control
this permission at more finer scope, such as Run
.)
Every Permission
belongs to a set of scopes. Each scope is to be represented
as a constant. This class defines a few constants, but plugins can define their own.
Modifier and Type | Field and Description |
---|---|
static PermissionScope |
COMPUTER
|
static PermissionScope |
ITEM
|
static PermissionScope |
ITEM_GROUP
Permissions scoped to containers of
Item s. |
static PermissionScope |
JENKINS
Permissions scoped to the entire Jenkins instance.
|
Class<? extends ModelObject> |
modelClass
Domain model type that approximates this scope.
|
static PermissionScope |
RUN
|
Constructor and Description |
---|
PermissionScope(Class<? extends ModelObject> modelClass,
PermissionScope... containers) |
Modifier and Type | Method and Description |
---|---|
boolean |
isContainedBy(PermissionScope s)
Returns true if this scope is directly or indirectly contained by the given scope.
|
public final Class<? extends ModelObject> modelClass
public static final PermissionScope JENKINS
public static final PermissionScope ITEM_GROUP
Item
s.public static final PermissionScope ITEM
public static final PermissionScope RUN
public static final PermissionScope COMPUTER
public PermissionScope(Class<? extends ModelObject> modelClass, PermissionScope... containers)
public boolean isContainedBy(PermissionScope s)
A scope always contains itself.
Copyright © 2004–2021. All rights reserved.