mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #6934 from overleaf/ab-sso-user-assignment
Fix assignment by user ID for SSO test GitOrigin-RevId: a487bf45444507246899ea918ffe02ad67e514d4
This commit is contained in:
parent
b2e93f7db7
commit
0edd4b7899
1 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,7 @@ const _ = require('lodash')
|
|||
const { callbackify } = require('util')
|
||||
const SplitTestCache = require('./SplitTestCache')
|
||||
const { SplitTest } = require('../../models/SplitTest')
|
||||
const UserAnalyticsIdCache = require('../Analytics/UserAnalyticsIdCache')
|
||||
|
||||
const DEFAULT_VARIANT = 'default'
|
||||
const ALPHA_PHASE = 'alpha'
|
||||
|
@ -78,7 +79,8 @@ async function getAssignmentForUser(
|
|||
splitTestName,
|
||||
{ sync = false } = {}
|
||||
) {
|
||||
return _getAssignment(splitTestName, { userId, sync })
|
||||
const analyticsId = await UserAnalyticsIdCache.get(userId)
|
||||
return _getAssignment(splitTestName, { analyticsId, userId, sync })
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue