-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-70548] Allow GitHub Webhooks to be created by users with custom roles #375
base: master
Are you sure you want to change the base?
[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? |
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