Skip to content

Show Billing menu to users with Auditor access

Diana Zubova requested to merge dz/378074-show-menu-item-for-audit into master

What does this MR do and why?

Add "Billing" to the Settings sections of the group for users with Auditor access level.

User Settings menu Billing item Other menu items
Has regular access level and is a group owner Shown Shown Shown
Has auditor access level and is a guest Shown Shown Hidden
Has regular access level and is a guest Hidden Hidden Hidden

Related to #378074 (closed)

Screenshots or screen recordings

User Screenshot before Screenshot after
Has regular access level and is a group owner (no changes) Screenshot_2022-10-24_at_18.39.23 Screenshot_2022-10-24_at_18.39.23
Has auditor access level and is a guest Screenshot_2022-10-24_at_16.31.07 Screenshot_2022-10-24_at_16.20.19
Has regular access level and is a guest (no changes) Screenshot_2022-10-24_at_16.31.07 Screenshot_2022-10-24_at_16.31.07

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 see Billing menu item on group level Settings menu
  • Create an auditor user, invite them to the group as a guest, then impersonate as that user
  • Verify that you can see Billing menu items on that group level Settings menu
  • Create another user with Regular access level and invite them to the group as a guest, then impersonate as that user
  • Verify that you don't Settings menu on a group level

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 Diana Zubova

Merge request reports