Class GrantRequestLinks
java.lang.Object
io.jenkins.plugins.batchcontrol.ui.GrantRequestLinks
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class GrantRequestLinks
extends Object
Links to the new grant request form on the Grants screen, prefilled for one item and one
action (U-01 convention:
new?scopeFullName=&actions=, D-66; D-71: a window names exactly
one item, so there is no scope type). Used by refusal pages (a change or a move that needs a
permission window).
Read-only. The item is resolved as the viewer, so an item the viewer cannot see yields no
link, and the Grants screen resolves the name again before it prefills anything. No link is
offered for an action that cannot apply to the item (applies(hudson.model.Item, io.jenkins.plugins.batchcontrol.model.GrantAction)), because the request
would be refused at submission.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanapplies(Item item, GrantAction action) D-71: whether a permission window carryingactioncan nameitem: it must be a top-level item (a job or a folder of any kind); CREATE applies only to a regular folder (GrantScope.createAppliesTo(hudson.model.Item)) and DELETE only to a job (GrantScope.deleteAppliesTo(hudson.model.Item)).static booleanWhether the current user may open the Grants screen and submit a grant request.static StringRoot-relative URL of the prefilled form, ornullwhen the item is not visible to the viewer, cannot be named by a window (the Jenkins root, a sub-item of a job), the action is not one a window can carry, or it cannot apply to the item (D-71).
-
Method Details
-
canRequest
public static boolean canRequest()Whether the current user may open the Grants screen and submit a grant request. -
url
Root-relative URL of the prefilled form, ornullwhen the item is not visible to the viewer, cannot be named by a window (the Jenkins root, a sub-item of a job), the action is not one a window can carry, or it cannot apply to the item (D-71).- Parameters:
fullName- full name of the job or folder the window would name; for CREATE, the folder the new item is to be created inaction- aGrantActionname (CREATE, CONFIGURE, DELETE)
-
applies
D-71: whether a permission window carryingactioncan nameitem: it must be a top-level item (a job or a folder of any kind); CREATE applies only to a regular folder (GrantScope.createAppliesTo(hudson.model.Item)) and DELETE only to a job (GrantScope.deleteAppliesTo(hudson.model.Item)). The service refuses the others at submission.
-