Skip to content

Allow access to Dependency list to members of a custom role

mo khan requested to merge mokhax/438747/custom-roles into master

What does this MR do and why?

This change ensures that members of a custom role with the :read_dependency permission are allowed to view the Explore / Dependency list page. It looks like no code changes are needed because when a custom permission is applied through a custom role this action updates the users' project authorizations. I would like to preserve this behavior by submitting the tests included in this MR.

#438748 (closed)

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

Before After
image Same as before but with more tests. 😄

How to set up and validate locally

  1. In rails console enable the experiment fully
    Feature.enable(:explore_dependencies)
  2. Create a custom role with the :read_dependency permission enabled.
  3. Assign role to a new or existing user.
  4. Log in as the target user.
  5. Visit http://127.0.0.1:3000/explore/dependencies
Edited by mo khan

Merge request reports