Skip to content

Hide add oncall schedule buttons for unauthorized users

What does this MR do and why?

Describe in detail what your merge request does and why.

Removal of edit and delete buttons in on-call schedules for users with less than maintainer role

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

before after
with schedules Screen_Shot_2022-09-05_at_12.56.07 Screen_Shot_2022-09-05_at_12.53.08
without schedules Screen_Shot_2022-09-05_at_12.56.14 Screen_Shot_2022-09-05_at_12.50.05

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

TO do this you must impersonate a developer on the project, if you use the default gdk pre-loaded projects, it is best to impersonate victor as they are a developer on 2 projects ("GitLab shell" and "GitLab test")

  1. View on-call schedules as admin (or at least maintainer), access by left hand menu, monitor > on-call schedules
  2. Add an oncall schedule if project does not have one
  3. Impersonate a user with developer role
  4. Return to view the on-call schedules that were just created and notice the lack of edit buttons
  5. As impersonated developer also visit a project's on-call schedule where none exist so you can see the updated copy and removed "add schedule" button

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #363271 (closed)

Edited by James Rushford

Merge request reports