Allow New Guest Users Exceeding Instance User Cap on Ultimate License
What does this MR do and why?
Allow new guest users exceeding the instance user cap on an Ultimate license.
This is behind a feature flag.
- When the feature flag is enabled, new non-billable users will be set to active even if they exceed the instance user cap. For instance, Guest users on an Ultimate license will be set to active. Billable users will still be set to the blocked pending approval state if they exceed the user cap.
- With the feature flag disabled, any new human user, billable or not,
will be blocked pending approval if the instance user cap is exceeded. This is the current behavior on the
master
branch.
Issue: #361563
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
All videos below are on an instance with an exceeded instance-wide user cap and an Ultimate license.
Inviting a new user to a group by email
Before, inviting a Guest or any other role results in the new user being blocked pending approval.
Before |
---|
InviteGuestBefore |
After, inviting a Guest now results in the user being active. Inviting a Developer results in the user being blocked pending approval.
After (Inviting a Guest) | After (Inviting a Developer) |
---|---|
InviteGuestAfter | InviteDeveloperAfter |
A new user signs up without an invitation
Before, a new user who signs up is blocked pending administrator approval and cannot login.
After, a new user who signs up is active and automatically logged in as if the user cap does not exist. Note that this change means that the instance user cap does not prevent new signups anymore at all on an Ultimate license since new manual signups do not have a role anywhere yet and are therefore not billable. The user cap only blocks users signing up via an invitation that would result in a billable role.
Before | After |
---|---|
NewUserSignupBefore | NewUserSignupAfter |
How to set up and validate locally
- Set an instance wide user cap below the current number of billable users on your GitLab instance.
- Enable the feature flag:
Feature.enable(:activate_nonbillable_users_over_instance_user_cap)
- Follow the steps seen in the videos above. Invite a member to a group by email. Try with both a Guest user and a Developer or other role. Try to sign up as a new user without an invitation via the registration page.