mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02: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:
@@ -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 })
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user