Skip to content

Allow viewing webhook logs with admin_hook permission

Kev Kloss requested to merge kkloss-hook-logs-with-admin_hook-permission into master

What does this MR do and why?

This allows viewing the hook logs with the admin_web_hook permission, so that group/project members with a custom role that allow managing webhooks can see view the logs.

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

You may not be able to view the Settings > Webhooks link with the custom role mentioned below, see Show webhook settings link if user has permissions (!153808) for a fix. For now, you’ll have to copy the URL (e.g. /groups/flightjs/-/hooks/1/edit).

  1. Create a custom role that allows managing webhooks
  2. Go to a project
  3. Create a webhook
  4. Trigger a webhook test (e.g. push)
  5. Add a member with the previously created custom role
  6. Impersonate the member
  7. Go to the webhooks edit page
  8. Click on a View details link in the Recent events list
  9. See that the member can view the page
Edited by Kev Kloss

Merge request reports