mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
feat: allow for users on both free plans and premium plans to use the freemium ai assist (#26350)
GitOrigin-RevId: cef1051800abac3d4f7039ade2d79c75d5c15c8f
This commit is contained in:
committed by
Copybot
parent
24caafa6f0
commit
50268ba998
@@ -659,13 +659,9 @@ const _ProjectController = {
|
||||
const hasPaidSubscription = isPaidSubscription(subscription)
|
||||
const hasManuallyCollectedSubscription =
|
||||
subscription?.collectionMethod === 'manual'
|
||||
const canPurchaseAddons = !(
|
||||
hasPaidSubscription || hasManuallyCollectedSubscription
|
||||
)
|
||||
const assistantDisabled = user.aiErrorAssistant?.enabled === false // the assistant has been manually disabled by the user
|
||||
const canUseErrorAssistant =
|
||||
(user.features?.aiErrorAssistant || canPurchaseAddons) &&
|
||||
!assistantDisabled
|
||||
!hasManuallyCollectedSubscription && !assistantDisabled
|
||||
|
||||
let featureUsage = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user