Draft: Use ownership to decide trials_allowed? exclusion
What does this MR do and why?
Change UsersHelper#trials_allowed?
to exclude based on user owning a paid namespace, not just belonging to one.
Context
While working on https://gitlab.com/gitlab-org/gitlab/-/issues/416651+, we renamed User#has_paid_namespace?
to User#belongs_to_paid_namespace?
, and fixed its behaviour to check for all groups and projects a user is a non-guest member of.
The original User#has_paid_namespace?
method name was ambiguously named, so it was sometimes used with the expectation that it returns the paid namespaces owned by the user.
Similarly in the past, the trials gear had to clarify another user method name to one that specifies ownership. While we were investigating how other methods used has_paid_namespace?
, to see if changes here would impact them, we realized the original intention of trials_allowed?
is to check for owner-level access.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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.