Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(billing): Invite billing members to a developer plan #80129

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

jarrettscott
Copy link

@jarrettscott jarrettscott commented Nov 1, 2024

Description

Allow Billing members to be added to Developer plans.

Introduces a new variable, isOverMemberLimit, which mimics the getsentry calculation. When the member limit is reached, the only available role for new member invitations will be the Billing role. The role and team dropdown menus will be disabled. Additional UI elements are also disabled.

Screenshot 2024-11-18 at 4 54 11 PM Screenshot 2024-11-20 at 10 02 34 AM

NOTE: This ability will be hidden behind a feature flag. When an org reaches the member limit, they must request permission before they will be allowed to add a billing member.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 1, 2024
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #80129      +/-   ##
==========================================
+ Coverage   78.48%   80.34%   +1.85%     
==========================================
  Files        7209     7216       +7     
  Lines      319472   319491      +19     
  Branches    43975    20780   -23195     
==========================================
+ Hits       250732   256689    +5957     
- Misses      62340    62408      +68     
+ Partials     6400      394    -6006     

@jarrettscott jarrettscott changed the title feat(billing): WIP Invite billing members to a developer plan feat(billing): Invite billing members to a developer plan Nov 7, 2024
Copy link

codecov bot commented Nov 12, 2024

Bundle Report

Changes will increase total bundle size by 93.46kB (0.29%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
app-webpack-bundle-array-push 31.99MB 93.46kB (0.29%) ⬆️

"scopes": {"org:billing"},
"is_team_roles_allowed": False,
"is_retired": False,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this role will expose this for the self-hosted open source instances of Sentry.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the billing role in dc79aba. The role was being used for validation purposes. The refactored validation logic will inspect the feature flags and determine if a bypass is needed.


if assigned_org_role != "billing" and not features.has(
"organizations:invite-members", organization, actor=request.user
):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inviting billing members would be equivalent to inviting owners on the developer plan.

I wasn't able to invite another owner on the developer plan, so that would also need to change to match the behaviour:

Screenshot 2024-11-12 at 2 34 07 PM

Copy link
Member

@dashed dashed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants