-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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: Issue enforcing user limits on start plan #7188
fix: Issue enforcing user limits on start plan #7188
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
Make sure to check off this list before asking for review. |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #7188 +/- ##
==========================================
- Coverage 32.66% 32.65% -0.01%
==========================================
Files 3337 3337
Lines 199394 199394
Branches 21833 21831 -2
==========================================
- Hits 65129 65121 -8
- Misses 133189 133197 +8
Partials 1076 1076
☔ View full report in Codecov by Sentry. |
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.
Can we add a test that would fail without this fix, and then passes with this fix? 🙏🏽
@@ -231,7 +231,7 @@ export class PasswordResetController { | |||
|
|||
const user = await this.userService.findOne({ | |||
where: { id: decodedToken.sub }, | |||
relations: ['authIdentities'], | |||
relations: ['authIdentities', 'globalRole'], |
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.
We really need better sub-classing of DB entities in the ORM code. So, instead of guessing if user.globalRole
exists or not, we have have separate types with and without the globalRole
property. That way issues like these could be caught during compile time.
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.
Can we just create a new type from User where the role is required (UserWithRole) and use in the functions where we need the role. Then developers will use a type guard function to narrow the type from User to UserWithRole? is that what you are suggesting?
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.
friendly ping @netroy
Passing run #2230 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
✅ All Cypress E2E specs passed |
## [1.8.1](https://github.com/n8n-io/n8n/compare/[email protected]@1.8.1) (2023-09-21) ### Bug Fixes * **Airtable Node:** Attachments field type fix ([#7227](#7227)) ([ebfcc87](ebfcc87)) * **core:** Handle filename* with quotes in Content-Disposition header ([#7229](#7229)) ([fb36b0a](fb36b0a)) * Ensure new Set node is on top of search list ([#7215](#7215)) ([c8fb06f](c8fb06f)) * Issue enforcing user limits on start plan ([#7188](#7188)) ([50a4c5e](50a4c5e)) ### Reverts * **core:** Add command to trigger license refresh on workers ([#7184](#7184)) ([6ac19a5](6ac19a5)) Co-authored-by: netroy <[email protected]>
Got released with |
## [1.8.2](https://github.com/n8n-io/n8n/compare/[email protected]@1.8.2) (2023-09-25) ### Bug Fixes * **editor:** Add debug feature docs link ([#7240](#7240)) ([1b2ccca](1b2ccca)) * **editor:** Fix SQL editor issue ([#7236](#7236)) ([539f954](539f954)) ### Reverts * Revert "fix: Issue enforcing user limits on start plan (#7188)" ([6589580](6589580)) Co-authored-by: netroy <[email protected]>
# [1.9.0](https://github.com/n8n-io/n8n/compare/[email protected]@1.9.0) (2023-09-28) ### Bug Fixes * **Airtable Node:** Attachments field type fix ([#7227](#7227)) ([2af967c](2af967c)) * **core:** Change WorkflowHistory nodes/connections columns to be json ([#7282](#7282)) ([a80abad](a80abad)) * **core:** Fix binary data manager check on pruning ([#7251](#7251)) ([484035e](484035e)) * **core:** Fix missing execution ID in webhook-based workflow producing binary data ([#7244](#7244)) ([33991e9](33991e9)) * **core:** Handle filename* with quotes in Content-Disposition header ([#7229](#7229)) ([67b985f](67b985f)) * **core:** Make DNS resolution order configurable ([#7272](#7272)) ([5b3121c](5b3121c)) * **core:** Make senderId required for all command messages ([#7252](#7252)) ([4b01428](4b01428)) * **core:** Prevent executions from displaying Running status incorrectly ([#7261](#7261)) ([861cac5](861cac5)) * **core:** Use consistent timezone-aware timestamps in postgres ([#6948](#6948)) ([0132514](0132514)), closes [#2178](#2178) [#2810](#2810) [#3855](#3855) [#2813](#2813) * **editor:** Add debug feature docs link ([#7240](#7240)) ([4614e1e](4614e1e)) * **editor:** Fix SQL editor issue ([#7236](#7236)) ([647fc6c](647fc6c)) * **editor:** Ensure new Set node is on top of search list ([#7215](#7215)) ([2491ccf](2491ccf)) * **editor:** Forbid password reset when cloud account is limited in the number of users [7188](#7188) ([303bc8e](303bc8e)) * **HTTP Request Node:** Add suggestion how to fix '429 - too many requests' errors ([#7293](#7293)) ([0bc33b1](0bc33b1)) * **Item Lists Node:** Concatenate operation pairedItems fix ([#7286](#7286)) ([cde23a1](cde23a1)) * **Respond to Webhook Node:** JSON output from expression fix ([#7294](#7294)) ([8bc369d](8bc369d)) ### Features * Add onboarding flow ([#7212](#7212)) ([01e9340](01e9340)) * **core:** Add secrets provider reload and refactor ([#7277](#7277)) ([53a7502](53a7502)) * **core:** Add Tournament as the new default expression evaluator ([#6964](#6964)) ([bf74f09](bf74f09)) * **core:** Initial workflow history API ([#7234](#7234)) ([0083a9e](0083a9e)) * **core:** Introduce object store service ([#7225](#7225)) ([fa84545](fa84545)) * **editor:** Add user cloud ID to telemetry [#7232](#7232) ([60c152d](60c152d)) * **editor:** Rework banners framework and add email confirmation banner ([#7205](#7205)) ([b0e98b5](b0e98b5)) * **MISP Node:** Update credential to support HTTP Request node ([#7268](#7268)) ([e4c302c](e4c302c)) ### Performance Improvements * **core:** Skip unneeded calls on every pruning cycle ([#7260](#7260)) ([db01164](db01164)) Co-authored-by: netroy <[email protected]>
Github issue / Community forum post (link here to close automatically):