Skip to content

Only show usage quota view for root ancestor namespaces

Janis Altherr requested to merge janis-fix-non-root-usage-quota-view into master

What does this MR do and why?

There was an unintended case where you could see the pages usage quota view in a group that was not the root level namespace (group/group).

This change hides the usage quota tab for non-root namespaces. This change allows simplifying the count_versioned_deployments_for method in pages_deployment.rb as well.

How to set up and validate locally

  1. Ensure you have a group with an ultimate license.
  2. create a subgroup.
  3. inside that subgroups sidebar, go to settings > usage quotas.
  4. Ensure the "Pages" tab is no longer visible.
Edited by Janis Altherr

Merge request reports

Loading