Class BatchControlRoleBasedAuthorizationStrategy.DescriptorImpl

java.lang.Object
hudson.model.Descriptor<AuthorizationStrategy>
io.jenkins.plugins.batchcontrol.security.BatchControlRoleBasedAuthorizationStrategy.DescriptorImpl
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Enclosing class:
BatchControlRoleBasedAuthorizationStrategy

@Extension(optional=true) @Symbol("batchControlRoleBased") @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final class BatchControlRoleBasedAuthorizationStrategy.DescriptorImpl extends Descriptor<AuthorizationStrategy>
Listed on the security page. The parent's descriptor is final, so this one is separate. Selecting it builds the strategy the way role-strategy does (keeping the installed roles, or an admin role for the current user when coming from another strategy) and copies the result into this class.

e2e-03 DEF-20, D-35g: role-strategy's Manage Roles and Assign Roles pages address the installed strategy's descriptor (/descriptor/<class>/checkPattern and /checkSidName). Those endpoints and the parent descriptor's role-page members are forwarded to role-strategy's own descriptor, so behaviour is identical to the plain strategy. The parent restricts most of them; access-modifier-suppressions allows the forwarding calls. The web methods keep @RequirePOST and an inline permission check; the parent performs its own checks as well.

  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • getDisplayName

      @NonNull public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<AuthorizationStrategy>
    • newInstance

      public AuthorizationStrategy newInstance(org.kohsuke.stapler.StaplerRequest2 req, @NonNull net.sf.json.JSONObject formData) throws Descriptor.FormException
      Overrides:
      newInstance in class Descriptor<AuthorizationStrategy>
      Throws:
      Descriptor.FormException
    • doCheckSidName

      @SuppressRestrictedWarnings(com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy.DescriptorImpl.class) public FormValidation doCheckSidName(@QueryParameter String value, @QueryParameter String type)
      Assign Roles (role-strategy 927 index.jelly): resolves the sid typed in the add dialog as a user or group (type USER or GROUP).
    • doCheckPattern

      @SuppressRestrictedWarnings(com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy.DescriptorImpl.class) public FormValidation doCheckPattern(@QueryParameter String value)
      Manage Roles (role-strategy 927 manage-roles.jelly): validates a role pattern.
    • getGroups

      public List<PermissionGroup> getGroups(@NonNull String type)
      The permission groups shown for a role type.
    • showPermission

      @SuppressRestrictedWarnings(com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy.DescriptorImpl.class) public boolean showPermission(String type, Permission p)
      Whether a permission is shown for a role type.
    • impliedByList

      @SuppressRestrictedWarnings(com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy.DescriptorImpl.class) public String impliedByList(Permission p)
      The space-separated ids of the permissions implying p.