Class GrantsSection.Row

java.lang.Object
io.jenkins.plugins.batchcontrol.action.GrantsSection.Row
Enclosing class:
GrantsSection

public static final class GrantsSection.Row extends Object
One row of the Grants lists: a grant request and, once approved, its permission window (the window carries the request's id). D-66: every request is listed exactly once — pending, active (its window is open) or ended (its window ended, or it was never approved) — instead of a request table that repeated the window tables.

A window whose request is no longer stored is listed on its own, without a detail link.

D-74: a row with a window names the window's item (Grant.getScope()), not the name the request was made for: an open window follows its item when an administrator (or a user with their own permissions) renames or moves it, and an ended one keeps the name its item had when it ended. D-75 (1), security-39 S-39-04: that followed name is shown only to a viewer who may read the item (getShownScope()).

  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    D-71: the kind of the item the row names (icon and display name), or null.
     
    #18.2 (colour badges): the status of the row's request, which the How cell of an ended row carries in its badge (tags/status.jelly) next to its own wording: "Rejected by a1" for a rejected request, and for an approved one how its window ended ("Expired", "Revoked by admin").
    D-75 (1), security-39 S-39-04: the name the Scope cell shows (tags/scopeItem.jelly): a window's followed name only to a viewer who may read the item now (or an administrator), otherwise the approved name with the fixed "moved" note; unchanged when the name did not change.
    The window holder, or the requester before there is a window.
    boolean
    Whether the row links to a detail page (/batch-control/grants/<id>/).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getId

      public String getId()
    • getRequest

      @CheckForNull public GrantRequest getRequest()
    • getGrant

      @CheckForNull public Grant getGrant()
    • isLinked

      public boolean isLinked()
      Whether the row links to a detail page (/batch-control/grants/<id>/).
    • getShownScope

      public ScopeDisplay getShownScope()
      D-75 (1), security-39 S-39-04: the name the Scope cell shows (tags/scopeItem.jelly): a window's followed name only to a viewer who may read the item now (or an administrator), otherwise the approved name with the fixed "moved" note; unchanged when the name did not change. The current name itself has no view getter, so the page cannot show it otherwise.
    • getItemKind

      @CheckForNull public ItemKind getItemKind()
      D-71: the kind of the item the row names (icon and display name), or null.
    • getActions

      public List<GrantAction> getActions()
    • getUser

      public String getUser()
      The window holder, or the requester before there is a window.
    • getRequestStatus

      @CheckForNull public RequestStatus getRequestStatus()
      #18.2 (colour badges): the status of the row's request, which the How cell of an ended row carries in its badge (tags/status.jelly) next to its own wording: "Rejected by a1" for a rejected request, and for an approved one how its window ended ("Expired", "Revoked by admin"). null for a window without a stored request, whose cell is plain text.