Skip to content

Refactor the AddOnPurchasePolicy

Bishwa Hang Rai requested to merge 432209-add-on-purhcase-policy into master

What does this MR do and why?

Refactor the AddOnPurchasePolicy

For Self-Managed instance, add_on_purchase record won't have associated namespace.

This MR extracts the 'admin_add_on_purchase' rule out of GroupPolicy into its own AddOnPurchasePolicy. This will help us to use the policy for both SaaS and Self-Managed logic.

This will be used in follow up MR for the epic: https://gitlab.com/groups/gitlab-org/-/epics/11996

How to set up and validate locally

All existing specs are green.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #432209

Merge request reports