Add new auditor rules for billing page
What does this MR do and why?
Resolves #351601 (closed)
This creates a new policy rule for auditors that allows them to view the billing page. The functionality is behind the auditor_billing_page_access feature flag.
Screenshots or screen recordings
| Before | After | |
|---|---|---|
| Owner View - Group | ![]() |
![]() |
| Auditor View - Group | ![]() |
(same as owner) |
| Guest View - Group | ![]() |
![]() |
| All users view - Profile | ![]() |
No change |
How to set up and validate locally
- Setup and run CustomersDot
- Within your gitlab terminal window, run
export GITLAB_SIMULATE_SAAS=1 - If GDK is already running, restart it
- Run
rails cto open the rails console - Run
::Gitlab::CurrentSettings.update(check_namespace_plan: true)and::Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true) - Enable
auditor_billing_page_accessfeature flag
Group Billing Page
- Ensure you have a group where you're an owner, or create one
- Verify that you can still access
groups/<group-name>/-/billings - Create an auditor user, invite them to the group, then impersonate as that user
- Verify that you can still access
groups/<group-name>/-/billings- The sidebar button for the billings page will not be present. This will be added in a follow up MR.
- Attempt to access
groups/<group-name>/-/billingswith a guest user that's a group member but not an auditor. This should still 404.
Profile Billing Page
- Regression test that all user types are able to access
:3000/-/profile/billings
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Laura Callahan





