Package hudson.security
Class PermissionScope
- java.lang.Object
-
- hudson.security.PermissionScope
-
public final class PermissionScope extends Object
Represents the model classPermissionacts on and scoped to.This abstraction primarily controls what permissions are configurable at what level.
For example, "create an item" is scoped to
ItemGroupin 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 asRun.)Every
Permissionbelongs 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.- Since:
- 1.421
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description static PermissionScopeCOMPUTERstatic PermissionScopeITEMstatic PermissionScopeITEM_GROUPPermissions scoped to containers ofItems.static PermissionScopeJENKINSPermissions scoped to the entire Jenkins instance.Class<? extends ModelObject>modelClassDomain model type that approximates this scope.static PermissionScopeRUN
-
Constructor Summary
Constructors Constructor Description PermissionScope(Class<? extends ModelObject> modelClass, PermissionScope... containers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisContainedBy(PermissionScope s)Returns true if this scope is directly or indirectly contained by the given scope.
-
-
-
Field Detail
-
modelClass
public final Class<? extends ModelObject> modelClass
Domain model type that approximates this scope.
-
JENKINS
public static final PermissionScope JENKINS
Permissions scoped to the entire Jenkins instance.
-
ITEM_GROUP
public static final PermissionScope ITEM_GROUP
Permissions scoped to containers ofItems.
-
ITEM
public static final PermissionScope ITEM
-
RUN
public static final PermissionScope RUN
-
COMPUTER
public static final PermissionScope COMPUTER
-
-
Constructor Detail
-
PermissionScope
public PermissionScope(Class<? extends ModelObject> modelClass, PermissionScope... containers)
-
-
Method Detail
-
isContainedBy
public boolean isContainedBy(PermissionScope s)
Returns true if this scope is directly or indirectly contained by the given scope.A scope always contains itself.
-
-