-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
* Jenkins 2.289.3
* Shelve Project Plugin 3.2
In the following scenario:
- Choose `Project-based Matrix Authorization Strategy` Athorization strategy (and other like Role-Base strategy)
- `user1` without the `job - delete` permission at the Jenkins root level.
- `user1` with `job - delete` permission at the project (pipeline) level.
The user is able to see the `delete project` link but not the `shelve project` link.
Reviewing the source code, I found the following line:
I believe the item that is currently visited should be checked and not the `Jenkins.getInstance()` item.
This problem force us to grant job - deleting permission for all project if we want to shelve only one project.
ironcerocloudbees while not ideal, this is currently done so by design for simplicity sake when developing
JENKINS-27734(which introduced the possibility to shelve any kind of item, including containers (eg folder)).The issue with what you are proposing is that it would rely on the authorization scheme to inherit rights to children items which is not necessarily true, eg with the Project-based Matrix Authorization Strategy, one strategy is:
What this means is that you can have delete permission on an item, yet not have it on a child item. I'm not sure how Jenkins reconcile this, I'll need to mount a test environment and run some tests to understand the behavior of the delete action in Jenkins.