Class GrantScope
java.lang.Object
io.jenkins.plugins.batchcontrol.model.GrantScope
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class GrantScope
extends Object
Target of a grant request / grant: exactly one item, a job or a folder of any kind (D-71,
replaces the JOB, FOLDER and FOLDER_ONLY scopes of D-65). A window confers nothing on any other
item, including the items inside a folder.
- CONFIGURE (and EXTENDED_READ through the
impliedBywalk, P-11) is answered on the item's own ACL:includes(String). - CREATE is checked by core on the ACL of the group the new item is created in, so a CREATE
window, which can only exist on a regular folder (
createAppliesTo(Item)), admits creation directly inside that folder only:includes(String)of the group. - DELETE can only exist on a job (
deleteAppliesTo(Item)): deleting an item group that is not a job deletes its children as SYSTEM without checking them. - D-35c: the items its holder created through a CREATE window are matched by parent,
isParentOf(String), not by name prefix.
An empty full name (the Jenkins root) is not a valid scope: it is rejected when a grant
request is created and again when it is approved, and includes(String) matches
nothing for it. There is no root-scope / instance-wide grant.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancreateAppliesTo(Item item) D-71: whether a window's CREATE can apply toitem: a modifiable item group that is neither a job nor a computed folder (a regular folder; not a multibranch project or an organization folder, whose children are created by indexing).static booleandeleteAppliesTo(Item item) D-71: whether a window's DELETE can apply toitem: aJobonly, including multi-configuration and Maven projects, whose sub-items are part of the job.booleangetType()inthashCode()booleanWhether the given item full name is the scope item: an exact full-name match (D-71).booleanisParentOf(String itemFullName) D-35c (as amended by D-71): whether the scope item is the parent ofitemFullName, i.e.static GrantScopeThe scope naming exactly the itemfullName(D-71).static StringThe full name of the groupitemFullNamelies in (""for a root item).toString()
-
Constructor Details
-
GrantScope
-
-
Method Details
-
item
The scope naming exactly the itemfullName(D-71). -
getType
-
getFullName
-
includes
Whether the given item full name is the scope item: an exact full-name match (D-71). An empty scope name matches nothing at all — see below. -
isParentOf
D-35c (as amended by D-71): whether the scope item is the parent ofitemFullName, i.e. the item lies directly inside the scope folder (f/x, neverf/sub/xand neverfitself). -
parentOf
The full name of the groupitemFullNamelies in (""for a root item). -
createAppliesTo
D-71: whether a window's CREATE can apply toitem: a modifiable item group that is neither a job nor a computed folder (a regular folder; not a multibranch project or an organization folder, whose children are created by indexing). -
deleteAppliesTo
D-71: whether a window's DELETE can apply toitem: aJobonly, including multi-configuration and Maven projects, whose sub-items are part of the job. Never an item group that is not a job (a folder, a multibranch project, an organization folder): core'sAbstractItem.delete()deletes such a group's children as SYSTEM without checking them. -
equals
-
hashCode
public int hashCode() -
toString
-