Class ActiveGrantsSection

java.lang.Object
io.jenkins.plugins.batchcontrol.action.ActiveGrantsSection

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @StaplerAccessibleType public class ActiveGrantsSection extends Object
Routing object for /batch-control/grants/active/.... Active grants are listed on the grants index page; this subtree only carries the revoke endpoint POST /batch-control/grants/active/<grantId>/revoke.

The whole subtree sits behind the GrantsSection.getTarget() permission gate; the revoke endpoint additionally requires Manage (SPEC item 8).

StaplerAccessibleType: without a web method of its own (the former doIndex is now an index.jelly), Jenkins' routing filter would not let GrantsSection.getActive() return this type, and the revoke URLs below would answer 404.

  • Constructor Details

    • ActiveGrantsSection

      public ActiveGrantsSection()
  • Method Details

    • getViewPermissions

      public Permission[] getViewPermissions()
      The bare /batch-control/grants/active/ URL has nothing to show: its index.jelly redirects to the grants index (hosting review: no doIndex). Permissions for that view: the Grants screen's (SectionAccess.grants()), which the parent gate GrantsSection.getTarget() has already enforced.
    • getDynamic

      @CheckForNull public ActiveGrantsSection.Item getDynamic(String grantId)
      Stapler: serves /batch-control/grants/active/<grantId>/...; null renders a 404 when GrantService knows no grant with that id, for a malformed id and for any other failed lookup (S-39-01, RecordLookup). An existing grant that is no longer active still resolves: GrantService.revoke(java.lang.String) rejects it with a message.