-
Notifications
You must be signed in to change notification settings - Fork 406
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
fix(api): validate before creating projects based on current subscription #2869
Conversation
@tushar5526 is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2869 +/- ##
=======================================
Coverage 95.60% 95.61%
=======================================
Files 1009 1009
Lines 28904 28936 +32
=======================================
+ Hits 27634 27666 +32
Misses 1270 1270 ☔ View full report in Codecov by Sentry. |
…tion fix: Move max project constant to settings for tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for this @tushar5526 ! I've added a few (mostly minor) comments but this looks good on the whole.
Co-authored-by: Matthew Elwell <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a couple of minor comments but on the whole, this looks great. Thanks again @tushar5526 .
Closes #2835
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingChanges
Subscription metadata contains the number of projects allowed in a subscription, use that to validate and create project requests.
PS: All the tests are written assuming that the default subscription allows the creation of multiple projects, therefore I had to allow up to the creation of 10 projects in the default subscription for tests. Another way could to be change the default subscription for every failing test that requires the creation of multiple projects.
How did you test this code?
Created a test ORG and tried to create multiple projects via API.