Show possible groups approvers [RUN ALL RSPEC] [RUN AS-IF-FOSS]
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 |
---|---|
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
- Find a MR belonging to a group
ex. The Underscore
project belongs to the group Jashkenas
- Click edit
- Click Add approval rule
-
You will notice only the group that the project belongs to is shown
Project belonging to a user
- Find a MR not belonging to a group
ex. The public-project
project belongs to a user named Administrator
- Click edit
- Click Add approval rule
-
No group is shown, because this project doesn't belong to a group
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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