Skip to content

Show the billing table to Auditors who are not part of a group

Laura Callahan requested to merge 383102-use_correct_find_namespace into master

What does this MR do and why?

Related to #383102 (closed)

Show the billing table to Auditors who are not invited to a group. Additional details around expected behavior are listed here.

Screenshots or screen recordings

Before

Auditor that is invited to a group (at least a guest) Auditor that not invited to a group
Screenshot_2022-11-17_at_17.59.55 Screenshot_2022-11-17_at_10.23.28

After

Auditor that is invited to a group (at least a guest) No change Auditor that not invited to a group
auditor_group_member auditor_not_group_member

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 that user
  • Verify you can see the table but no manage buttons
  • Create another auditor user, do not invite them to the group, then impersonate that user
  • Verify you can see the table but no manage buttons

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