Use exclude_guests on overage check
What does this MR do and why?
For the existing check_overage pass a role (Guest/Developer/Reporter etc
) of the member/group to be added and exclude_guests
from API.
If a role is Guest
and the plan type is exclude guests - return no overage.
Otherwise, follow the standard rules for overage
Step | MR |
---|---|
Extend API with exclude_guests
|
!84069 (merged) |
Fetch this API to conditionally show overage modal when adding members/groups to a group |
|
Related to #353455 (closed)
Screenshots or screen recordings
With overage | Without overage |
---|---|
Screen_Recording_2022-04-06_at_15.18.44 | Screen_Recording_2022-04-06_at_15.19.50 |
How to set up and validate locally
- Enable the invite modal
Feature.enable(:overage_members_modal)
- Make sure that you are running GitLab as SaaS and have
check_namespace_plan
setting enabled::Gitlab::CurrentSettings.update(check_namespace_plan: true)
- Create a group, add a premium subscription for one seat
- Visit this group page, then Group Information -> Members
http://localhost:3000/groups/<your-group>/-/group_members
. - Click the
Invite member
orInvite group
button. - Add a member or group in a dropdown, choose role and click
Invite
. - Check the modal.
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.
Edited by Diana Zubova