Refactor the AddOnPurchasePolicy
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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #432209