mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
fix: Remove unnecessary loading of authentication rows in userProvisioner (#11413)
* fix: Remove unneccessary loading of authentication rows in userProvisioner * test
This commit is contained in:
@@ -145,7 +145,6 @@ describe("accountProvisioner", () => {
|
||||
expect(user.id).toEqual(userWithoutAuth.id);
|
||||
expect(isNewTeam).toEqual(false);
|
||||
expect(isNewUser).toEqual(false);
|
||||
expect(user.authentications.length).toEqual(0);
|
||||
});
|
||||
|
||||
it("should throw an error when authentication provider is disabled", async () => {
|
||||
|
||||
@@ -121,10 +121,7 @@ export default async function userProvisioner(
|
||||
|
||||
// A `user` record may exist even if there is no existing authentication record.
|
||||
// This is either an invite or a user that's external to the team
|
||||
const existingUser = await User.scope([
|
||||
"withAuthentications",
|
||||
"withTeam",
|
||||
]).findOne({
|
||||
const existingUser = await User.scope(["withTeam"]).findOne({
|
||||
where: {
|
||||
// Email from auth providers may be capitalized
|
||||
email: {
|
||||
|
||||
Reference in New Issue
Block a user