Skip to content

Give auditors read only access to billings page

Laura Callahan requested to merge 372964-read_only into master

What does this MR do and why?

Resolves #372964 (closed).

This creates a read-only view mode for auditors so that they can see the billing page but not make modifications. This is behind the :auditor_billing_page_access feature flag.

Screenshots or screen recordings

Before After
Owner view (unchanged) Screen_Shot_2022-09-19_at_2.36.56_PM Screen_Shot_2022-10-19_at_3.48.10_PM
Auditor view Screen_Shot_2022-10-19_at_3.48.10_PM Screen_Shot_2022-10-19_at_3.49.23_PM

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 c to 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_access feature flag

Group Billing Page

  • Ensure you have a group where you're an owner, or create one
  • Verify that you can still see the correct buttons on groups/<group-name>/-/billings
  • Create an auditor user, invite them to the group, then impersonate as that user
  • Verify that you cannot see any buttons on the subscription table

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.

Edited by Laura Callahan

Merge request reports