-
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
refactor(core): Extract all Auth-related User columns into a separate entity #9557
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n8n-assistant
bot
added
core
Enhancement outside /nodes-base and /editor-ui
n8n team
Authored by the n8n team
ui
Enhancement in /editor-ui or /design-system
labels
May 30, 2024
2 tasks
Before we were sending `mfaToken` and `mfaRecoveryCode` even though the user can only send one. It was working because we had an or condition in the backend. The changes on this PR change that condition, making it imposible to login with recovery codes. This change makes the FE to send only the field the user used making recovery codes work again.
Passing run #5200 ↗︎
Details:
Review all test suite changes for PR #9557 ↗︎ |
RicardoE105
previously approved these changes
May 30, 2024
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.
The code looks good. I tested it locally, and it worked fine! There is just a small fix in the FE, as the log-in with the recovery code broke.
|
RicardoE105
approved these changes
May 31, 2024
✅ All Cypress E2E specs passed |
MiloradFilipovic
added a commit
that referenced
this pull request
May 31, 2024
* master: fix(editor): Fix ts errors across the board (no-changelog) (#9561) refactor(core): Extract all Auth-related User columns into a separate entity (#9557) refactor(core): Update supertest, and fix some typing errors (no-changelog) (#9527) fix(editor): Render checkboxes in markdown (#9549) test(core): Rename and combine all credential api tests (no-changelog) (#9550) 🚀 Release 1.44.0 (#9553) feat(editor): Node Creator AI nodes improvements (#9484) fix(editor): Show workflow data in header when execution page is hard reloaded (#9529) refactor(core): Stop reporting to Sentry `NodeApiError` with 5xx status codes (no-changelog) (#9552) feat: HighLevel oauth2 api credentials (#9542) fix(editor): Fix empty node name handling (#9548) ci: Fix vulnerable dev dependencies (no-changelog) (#9545) fix: Don't throw errors for NaN in number operators in the filter component (#9506) fix(core): Try setting postgres search_path on the database (#9530) fix(editor): Redirect to workflows list after deleting a workflow (#9546) # Conflicts: # packages/editor-ui/src/views/NodeView.vue # pnpm-lock.yaml
Got released with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Db entities with columns marked with
select: false
or queries with aselect
param return a partial object that isn't type-safe, and creates the need for all sorts of checks and workarounds. This creates issues like in #9524 where the code does not guarantees that there will be anmfaSecret
in places that need one.This PR extracts those columns out into a separate DB entity that always contains those columns, and makes all code around this a bit more reliable with fewer runtime checks.
This also removes the need to filter out those columns for user objects that represent other users besides the one talking to the API.
Review / Merge checklist