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

c:select with readonlyMode still shows an add button and dropdown works or is empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • credentials-plugin
    • None
    • Credentials plugin: 1319.v7eb_51b_3a_c97b_

      When using <c:select> in a jelly file and readonlyMode is enabled, the dropdown is not disables and the add button still works.

      I noticed this while working on configfile provider plugin

      How to reproduce

      1. Install these credentials:
        credentials-binding
        extended-read-permission
        matrix.auth
      2. configure a read only user that has extended read on job
      3. create a user pwd credential
      4. create freestyle job and add a credential binding for the user/pwd
      5. View the job config with the read only user

      Expected

      The dropdown is disabled and only shows the active value.
      The add button is disabled or not shown at all

      Actual

      The dropdown is empty and the button is active but nothing happens when clicking on it.

       

      In another scenario with configfile provider, there is the ability to view a configfile from a job config. Here the user has job config permissions. On a change that I'm currently working on I use the readonlyMode setting that should disable all inputs but the credentials selection is not disabled.

      So when a user has no permissions to create credentials the add button shouldn't be shown at all I think

       

       

       

            Unassigned Unassigned
            mawinter69 Markus Winter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: