Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2727

Add Run permissions in project-based settings; also UI fixes for showing some links

XMLWordPrintable

    • Icon: Patch Patch
    • Resolution: Fixed
    • Icon: Major Major
    • _unsorted
    • None
    • Platform: All, OS: All

      Attached patch has the following changes:

      1) AuthorizationMatrixProperty.java: add PermissionGroup for Run.class in the
      DescriptorImpl.getAllGroups() result. This allows granting permission to delete
      builds (issue #2532) and update build descriptions in the project config screen.

      2) summary.jelly and AbstractBuild/index.jelly: set the object context for the
      hasPermission check so it checks project-based permissions rather than using
      Hudson.getInstance() context. This fixes whether or not the Workspace link is
      shown in the project screen (summary.jelly) and whether or not Delete button and
      add/update description are shown on a build screen (index.jelly).

      3) I updated Functions.hasPermission with the same "degrade gracefully" code
      that the checkPermission function has. Seems useful here too, though I don't
      think this change is required for above change #2 to work (I think these always
      pass a AccessControlled object, so don't use the extra code).

            Unassigned Unassigned
            mindless Alan Harder
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: