jenkinsci / jenkinsci/credentials-plugin

[JENKINS-72658] c:select with readonlyMode still shows an add button and dropdown works or is empty

Open
#952 2 comments 0 reactions 0 assignees View on GitHub
component:credentials-plugin imported-jira-issue priority:minor resolution:unresolved ux
Dominant language
Java
Stars
134
Forks
258
Avg merge
48m
Merged PRs (30d)
1

Description

When using 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

 

 

 

---
Originally reported by mawinter69, imported from: c:select with readonlyMode still shows an add button and dropdown works or is empty


  • status: Open
  • priority: Minor
  • component(s): credentials-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-08

Raw content of original issue

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

 

 

 

  • environment: Credentials plugin: 1319.v7eb_51b_3a_c97b_

2 attachments

- [image-2024-02-14-10-43-51-908.png](https://issues.jenkins.io/secure/attachment/62090/image-2024-02-14-10-43-51-908.png)
> ![image-2024-02-14-10-43-51-908.png](https://issues.jenkins.io/secure/attachment/62090/image-2024-02-14-10-43-51-908.png)
- [image-2024-02-14-10-46-32-582.png](https://issues.jenkins.io/secure/attachment/62091/image-2024-02-14-10-46-32-582.png)
> ![image-2024-02-14-10-46-32-582.png](https://issues.jenkins.io/secure/attachment/62091/image-2024-02-14-10-46-32-582.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.