mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
Admin tools, Authentication: Fix: set analyticsId when creating a new user
This commit is contained in:
committed by
yu-i-i
parent
f71de2eacc
commit
24e2fdaab5
@@ -1,3 +1,4 @@
|
||||
import crypto from 'node:crypto'
|
||||
import Settings from '@overleaf/settings'
|
||||
import UserCreator from '../../../../../app/src/Features/User/UserCreator.mjs'
|
||||
import { ParallelLoginError } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.mjs'
|
||||
@@ -42,6 +43,7 @@ const LDAPAuthenticationManager = {
|
||||
last_name: lastName,
|
||||
isAdmin: isAdmin,
|
||||
holdingAccount: false,
|
||||
analyticsId: crypto.randomUUID(),
|
||||
}
|
||||
)
|
||||
await User.updateOne(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import crypto from 'node:crypto'
|
||||
import Settings from '@overleaf/settings'
|
||||
import UserCreator from '../../../../../app/src/Features/User/UserCreator.mjs'
|
||||
import ThirdPartyIdentityManager from '../../../../../app/src/Features/User/ThirdPartyIdentityManager.mjs'
|
||||
@@ -58,6 +59,7 @@ const OIDCAuthenticationManager = {
|
||||
last_name: lastName,
|
||||
isAdmin: isAdmin,
|
||||
holdingAccount: false,
|
||||
analyticsId: crypto.randomUUID(),
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import crypto from 'node:crypto'
|
||||
import Settings from '@overleaf/settings'
|
||||
import UserCreator from '../../../../../app/src/Features/User/UserCreator.mjs'
|
||||
import { ParallelLoginError } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.mjs'
|
||||
@@ -43,6 +44,7 @@ const SAMLAuthenticationManager = {
|
||||
isAdmin: isAdmin,
|
||||
holdingAccount: false,
|
||||
samlIdentifiers: [{ providerId: providerId }],
|
||||
analyticsId: crypto.randomUUID(),
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user