Skip to content

Show possible groups approvers [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Samantha Ming requested to merge retry-approvers-dropdown-use-new-endpoint into master

Issue: #28902 (closed)

What does this MR do?

In this MR, we are showing only the possible groups that can be approvers in the approval rules. There is not UI change in this MR, we are simply updating using a different endpoint to fetch the groups. Currently (before), we are displaying all available groups. Now, we are only showing the groups that the project belongs to as approvers.

Before This MR
image image

Note: The is a revert of a reverted MR > !53781 (merged).

There are some differences from the original MR:

  • It's now behind a feature flag
  • The BE response is a bit different from the original, so I wrote different specs to match
  • I also passed new params with_shared

Testing Case

This feature is behind a feature flag, to turn on:

rails c

Feature.enable(:show_relevant_approval_rule_approvers)

Project belonging to a group

  1. Find a MR belonging to a group

ex. The Underscore project belongs to the group Jashkenas

image

  1. Click edit
  2. Click Add approval rule
  • You will notice only the group that the project belongs to is shown

image

Project belonging to a user

  1. Find a MR not belonging to a group

ex. The public-project project belongs to a user named Administrator

image

  1. Click edit
  2. Click Add approval rule
  • No group is shown, because this project doesn't belong to a group

image

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Samantha Ming

Merge request reports

Loading