mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
GitOrigin-RevId: da9624b51c0394c81f6355470322d7185a144b21
This commit is contained in:
committed by
Copybot
parent
4df3aca805
commit
01fc171472
@@ -647,13 +647,6 @@ const _ProjectController = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const hasPaidSubscription = isPaidSubscription(subscription)
|
|
||||||
const hasManuallyCollectedSubscription =
|
|
||||||
subscription?.collectionMethod === 'manual'
|
|
||||||
const assistantDisabled = user.aiErrorAssistant?.enabled === false // the assistant has been manually disabled by the user
|
|
||||||
const canUseErrorAssistant =
|
|
||||||
!hasManuallyCollectedSubscription && !assistantDisabled
|
|
||||||
|
|
||||||
let featureUsage = {}
|
let featureUsage = {}
|
||||||
|
|
||||||
if (Features.hasFeature('saas')) {
|
if (Features.hasFeature('saas')) {
|
||||||
@@ -734,6 +727,15 @@ const _ProjectController = {
|
|||||||
fullFeatureSet = await UserGetter.promises.getUserFeatures(userId)
|
fullFeatureSet = await UserGetter.promises.getUserFeatures(userId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hasPaidSubscription = isPaidSubscription(subscription)
|
||||||
|
const hasManuallyCollectedSubscription =
|
||||||
|
subscription?.collectionMethod === 'manual'
|
||||||
|
const assistantDisabled = user.aiErrorAssistant?.enabled === false // the assistant has been manually disabled by the user
|
||||||
|
const canUseErrorAssistant =
|
||||||
|
(!hasManuallyCollectedSubscription ||
|
||||||
|
fullFeatureSet?.aiErrorAssistant) &&
|
||||||
|
!assistantDisabled
|
||||||
|
|
||||||
const customerIoEnabled =
|
const customerIoEnabled =
|
||||||
await SplitTestHandler.promises.hasUserBeenAssignedToVariant(
|
await SplitTestHandler.promises.hasUserBeenAssignedToVariant(
|
||||||
req,
|
req,
|
||||||
|
|||||||
Reference in New Issue
Block a user