Add admin_web_hook ability to custom roles
What does this MR do and why?
Add admin_web_hook ability to custom roles. See gitlab-org/quality/triage-ops#1373
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Impersonate a user with something like developer role in a group
- Try and visit the project hooks path: http://gdk.local:3000/flightjs/Flight/-/hooks
- Try and visit the group hooks path: http://gdk.local:3000/groups/flightjs/-/hooks
- Both should return 404
- Create a custom role adding the "Admin web hook" ability
- Use base role of something lower than maintainer
- You can do this running in self managed mode in admin UI http://gdk.local:3000/admin/application_settings/roles_and_permissions or in SaaS mode using group settings UI http://gdk.local:3000/groups/flightjs/-/settings/roles_and_permissions)
- Assign the new custom role to the person you were impersonating
- Try and visit the project hooks path: http://gdk.local:3000/flightjs/Flight/-/hooks
- Try and visit the group hooks path: http://gdk.local:3000/groups/flightjs/-/hooks
- Both should work
🎉 - Try adding/editing/removing/testing etc- all should work
🎉 - Try the same using the API
Edited by Lee Tickett