hudson.security
Class PermissionScope

java.lang.Object
  extended by hudson.security.PermissionScope

public final class PermissionScope
extends Object

Represents the model class 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.

Since:
1.421
Author:
Kohsuke Kawaguchi

Field Summary
static PermissionScope COMPUTER
          Permissions scoped to current instances of Computers.
static PermissionScope ITEM
          Permissions scoped to Items (including Jobs and other subtypes)
static PermissionScope ITEM_GROUP
          Permissions scoped to containers of Items.
static PermissionScope JENKINS
          Permissions scoped to the entire Jenkins instance.
 Class modelClass
          Domain model type that approximates this scope.
static PermissionScope RUN
          Permissions scoped to Runs (including Builds and other subtypes)
 
Constructor Summary
PermissionScope(Class modelClass, PermissionScope... containers)
           
 
Method Summary
 boolean isContainedBy(PermissionScope s)
          Returns true if this scope is directly or indirectly contained by the given scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelClass

public final Class 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 of Items.


ITEM

public static final PermissionScope ITEM
Permissions scoped to Items (including Jobs and other subtypes)


RUN

public static final PermissionScope RUN
Permissions scoped to Runs (including Builds and other subtypes)


COMPUTER

public static final PermissionScope COMPUTER
Permissions scoped to current instances of Computers.

Constructor Detail

PermissionScope

public PermissionScope(Class 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.



Copyright © 2004-2013. All Rights Reserved.