Skip to content

Restrict activating members when on limit

Nicolas Dular requested to merge nd/limit-active-members-on-user-free-cap into master

What does this MR do and why?

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/352638. In the linked issue we want to toggle existing memberships of a user for free namespaces. However, we also need to validate that there are still seats left (when the feature flag is activated for the group).

This MR adds the logic to not being able to activate a member when a namespace is at the limit. No changelog because it's behind a feature flag free_user_cap.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

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.

Edited by Nicolas Dular

Merge request reports