[JENKINS-70548] Allow GitHub Webhooks to be created by users with custom roles#375
Conversation
|
@lanwen Any chance of getting this reviewed and (hopefully) merged? |
|
@KostyaSha would you mind taking a look at this? This feature would be very convenient in my team's permission structure. |
|
We can try, in case of issues could be reverted back |
|
@KostyaSha Any ETA on when it could be tried? This is a major factor for our effort to ensure principal of least privilege. |
|
It would be better to move it as option. Admin check was added to identify that returned object will be able to manage hooks. Now it can return connection that will lead to errors. Also AFAIR it was impossible to make an github API check whether user can manage hook and i sent request to github support. AFAIR permissions were listed in http headers and github-api library didn't support it (now it already supports afair). |
|
@KostyaSha I'm not certain how you'd want this to be implemented. For instance, it doesn't look like the library being used for the GitHub API supports custom roles (would return Are you saying that the admin check should still happen after the webhook permission is confirmed and simply not cause failure? |
|
I can't imagine this will ever be reviewed, so closing. |
Would really like for custom roles to be used in management of Webhooks, because otherwise Jenkins needs to have admin permissions on every repository where managed Webhooks are desired. This is my attempt at making this possible.
allowedToManageHooks()is enough.Intended to solve https://issues.jenkins.io/browse/JENKINS-70548.
Testing done
Passing tests and building successfully. A change in tests does not appear to be required.
Submitter checklist