-
Notifications
You must be signed in to change notification settings - Fork 8.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
✨ User management backend #2636
Conversation
@@ -1,3 +1,4 @@ | |||
/* eslint-disable @typescript-eslint/no-non-null-assertion */ |
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 don't want to add file wide rule disablings anymore but rather remove them. We should either remove them and refactor or think if the rule is needed or should be changed.
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.
For reference, @typescript-eslint/no-non-null-assertion
is almost always because of mistyped DB collections. I know how to fix the typing but agreed with Omar to defer until we finish UM.
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.
More generally, I have been removing lint exceptions in the testing branches. Perhaps we should wait until those are merged before refactoring and/or adding project-wide exceptions.
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.
flagged all places where we are adding file wide rule disablements. We def. need to refactor this
@@ -1,3 +1,4 @@ | |||
/* eslint-disable import/no-cycle */ |
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.
ref previous comments about file wide rule disablings
/* eslint-disable import/no-cycle */ | ||
/* eslint-disable @typescript-eslint/no-non-null-assertion */ |
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.
ref previous comments about file wide rule disablings
@@ -1,3 +1,4 @@ | |||
/* eslint-disable import/no-cycle */ |
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.
ref previous comments about file wide rule disablings
@@ -1,3 +1,4 @@ | |||
/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ |
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.
ref previous comments about file wide rule disablings
/* eslint-disable import/no-cycle */ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ |
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.
ref previous comments about file wide rule disablings
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ | ||
/* eslint-disable import/no-cycle */ |
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.
ref previous comments about file wide rule disablings
@@ -0,0 +1,57 @@ | |||
/* eslint-disable import/no-cycle */ |
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.
ref previous comments about file wide rule disablings
@@ -0,0 +1,57 @@ | |||
/* eslint-disable import/no-cycle */ |
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.
ref previous comments about file wide rule disablings
@@ -0,0 +1,106 @@ | |||
/* eslint-disable import/no-cycle */ |
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.
ref previous comments about file wide rule disablings
@@ -0,0 +1,141 @@ | |||
/* eslint-disable import/no-cycle */ |
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.
ref previous comments about file wide rule disablings
* 📦 Add crypto-js to /cli * 📦 Update package-lock.json * ✨ Create type for SMTP config * ⚡ Encrypt SMTP pass * ⚡ Update format for `userManagement.emails.mode` * ⚡ Update format for `binaryDataManager.mode` * ⚡ Update format for `logs.level` * 🔥 Remove logging * 👕 Fix lint
* remove mocks * update authorization func * lock down default role * 🐛 fix requiring authentication for OPTIONS requests * 🐛 fix cors and cookie issues in dev * update setup route Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
* ⚡ Refactor users namespace * ⚡ Adjust fillout endpoint * ⚡ Refactor initTestServer arg * ✏️ Specify agent type * ✏️ Specify role type * ⚡ Tighten `/users/:id` check * ✨ Add initial tests * 🚚 Reposition init server map * ⚡ Set constants in `validatePassword()` * ⚡ Tighten `/users/:id` check * ⚡ Improve checks in `/users/:id` * ✨ Add tests for `/users/:id` * 📦 Update package-lock.json * ⚡ Simplify expectation * ⚡ Reuse util for authless agent * 🚚 Make role names consistent * 📘 Tighten namespaces map type * 🔥 Remove unneeded default arg * ✨ Add tests for `POST /users` * 📘 Create test SMTP account type * ✏️ Improve wording * 🎨 Formatting * 🔥 Remove temp fix * ⚡ Replace helper with config call * ⚡ Fix failing tests * 🔥 Remove outdated test * 🔥 Remove unused helper * ⚡ Increase readability of domain fetcher * ⚡ Refactor payload validation * 🔥 Remove repetition * ⏪ Restore logging * ⚡ Initialize logger in tests * 🔥 Remove redundancy from check * 🚚 Move `globalOwnerRole` fetching to global scope * 🔥 Remove unused imports * 🚚 Move random utils to own module * 🚚 Move test types to own module * ✏️ Add dividers to utils * ✏️ Reorder `initTestServer` param docstring * ✏️ Add TODO comment * ⚡ Dry up member creation * ⚡ Tighten search criteria * 🧪 Add expectation to `GET /users` * ⚡ Create role fetcher utils * ⚡ Create one more role fetch util * 🔥 Remove unneeded DB query * 🧪 Add expectation to `POST /users` * 🧪 Add expectation to `DELETE /users/:id` * 🧪 Add another expectation to `DELETE /users/:id` * 🧪 Add expectations to `DELETE /users/:id` * 🧪 Adjust expectations in `POST /users/:id` * 🧪 Add expectations to `DELETE /users/:id` * 👕 Fix build * ⚡ Update method * 📘 Fix `userToDelete` type * ⚡ Refactor `createAgent()` * ⚡ Make role fetching global * ⚡ Optimize roles fetching * ⚡ Centralize member creation * ⚡ Refactor truncation helper * 🧪 Add teardown to `DELETE /users/:id` * 🧪 Add DB expectations to users tests * 🔥 Remove pass validation due to hash * ✏️ Improve pass validation error message * ⚡ Improve owner pass validation * ⚡ Create logger initialization helper * ⚡ Optimize helpers * ⚡ Restructure `getAllRoles` helper
* ⚡ Refactor users namespace * ⚡ Adjust fillout endpoint * ⚡ Refactor initTestServer arg * ✏️ Specify agent type * ✏️ Specify role type * ⚡ Tighten `/users/:id` check * ✨ Add initial tests * 🚚 Reposition init server map * ⚡ Set constants in `validatePassword()` * ⚡ Tighten `/users/:id` check * ⚡ Improve checks in `/users/:id` * ✨ Add tests for `/users/:id` * 📦 Update package-lock.json * ⚡ Simplify expectation * ⚡ Reuse util for authless agent * 🚚 Make role names consistent * 📘 Tighten namespaces map type * 🔥 Remove unneeded default arg * ✨ Add tests for `POST /users` * 📘 Create test SMTP account type * ✏️ Improve wording * 🎨 Formatting * 🔥 Remove temp fix * ⚡ Replace helper with config call * ⚡ Fix failing tests * 🔥 Remove outdated test * ✨ Add tests for password reset flow * ✏️ Fix test wording * ⚡ Set password reset namespace * 🔥 Remove unused helper * ⚡ Increase readability of domain fetcher * ⚡ Refactor payload validation * 🔥 Remove repetition * ⏪ Restore logging * ⚡ Initialize logger in tests * 🔥 Remove redundancy from check * 🚚 Move `globalOwnerRole` fetching to global scope * 🔥 Remove unused imports * 🚚 Move random utils to own module * 🚚 Move test types to own module * ✏️ Add dividers to utils * ✏️ Reorder `initTestServer` param docstring * ✏️ Add TODO comment * ⚡ Dry up member creation * ⚡ Tighten search criteria * 🧪 Add expectation to `GET /users` * ⚡ Create role fetcher utils * ⚡ Create one more role fetch util * 🔥 Remove unneeded DB query * 🧪 Add expectation to `POST /users` * 🧪 Add expectation to `DELETE /users/:id` * 🧪 Add another expectation to `DELETE /users/:id` * 🧪 Add expectations to `DELETE /users/:id` * 🧪 Adjust expectations in `POST /users/:id` * 🧪 Add expectations to `DELETE /users/:id` * 📘 Add namespace name to type * 🚚 Adjust imports * ⚡ Optimize `globalOwnerRole` fetching * 🧪 Add expectations * 👕 Fix build * 👕 Fix build * ⚡ Update method * ⚡ Update method * 🧪 Fix `POST /change-password` test * 📘 Fix `userToDelete` type * ⚡ Refactor `createAgent()` * ⚡ Make role fetching global * ⚡ Optimize roles fetching * ⚡ Centralize member creation * ⚡ Refactor truncation helper * 🧪 Add teardown to `DELETE /users/:id` * 🧪 Add DB expectations to users tests * ⚡ Refactor as in users namespace * 🧪 Add expectation to `POST /change-password` * 🔥 Remove pass validation due to hash * ✏️ Improve pass validation error message * ⚡ Improve owner pass validation * ⚡ Create logger initialization helper * ⚡ Optimize helpers * ⚡ Restructure `getAllRoles` helper * ⚡ Update `truncate` calls
… into user-management-backend
* Disable basic auth after owner has been set up * Remove unnecessary comparison
* Added public url variable for emails * Fixed base url for reset password - the current implementation overrides possibly existing path * Change variable name to editorUrl * Using correct name editorUrl for emails * Changed variable description * Improved base url naming and appending path so it remains consistent * Removed trailing slash from editor base url
* fix up i18n pattern * update translation keys * update urls * support i18n in nds * fix how external keys are handled * add source
Um/UI fixes
Use webhook url as fallback when editor url is not defined
add confirmation modal to setup
Got released with |
Creating the backend functionality to enable the usage of an n8n instance by multiple people simultaneously.