mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 04:41:32 +02:00
Merge pull request #25011 from overleaf/jel-group-audit-logs-part-2
[web] Update group audit log when user enrolls in managed users GitOrigin-RevId: 15d79854007ac3334a2bb66bcf73230bf42c68ce
This commit is contained in:
@@ -197,7 +197,8 @@ async function acceptInvite(req, res, next) {
|
||||
|
||||
const subscription = await TeamInvitesHandler.promises.acceptInvite(
|
||||
token,
|
||||
userId
|
||||
userId,
|
||||
{ initiatorId: userId, ipAddress: req.ip }
|
||||
)
|
||||
const groupSSOActive = (
|
||||
await Modules.promises.hooks.fire('hasGroupSSOEnabled', subscription)
|
||||
|
||||
@@ -64,7 +64,7 @@ async function importInvite(subscription, inviterName, email, token, sentAt) {
|
||||
return subscription.save()
|
||||
}
|
||||
|
||||
async function acceptInvite(token, userId) {
|
||||
async function acceptInvite(token, userId, auditLog) {
|
||||
const { invite, subscription } = await getInvite(token)
|
||||
if (!invite) {
|
||||
throw new Errors.NotFoundError('invite not found')
|
||||
@@ -76,7 +76,8 @@ async function acceptInvite(token, userId) {
|
||||
await Modules.promises.hooks.fire(
|
||||
'enrollInManagedSubscription',
|
||||
userId,
|
||||
subscription
|
||||
subscription,
|
||||
auditLog
|
||||
)
|
||||
}
|
||||
if (subscription.ssoConfig) {
|
||||
|
||||
@@ -126,7 +126,11 @@ class PromisifiedSubscription {
|
||||
return await Modules.promises.hooks.fire(
|
||||
'enrollInManagedSubscription',
|
||||
user._id,
|
||||
subscription
|
||||
subscription,
|
||||
{
|
||||
initiatorId: user._id,
|
||||
ipAddress: '0:0:0:0',
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user