mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-19 22:03:33 +00:00
Merge pull request #23721 from overleaf/jdt-hide-ai-for-paying-users-if-toggled
Hiding AI should hide assist for paying accounts GitOrigin-RevId: 6a1ec76d648be2986241ee6e87d74ce69c7c4867
This commit is contained in:
parent
8a81b0777a
commit
da3a24ad7e
2 changed files with 4 additions and 8 deletions
|
@ -352,7 +352,6 @@ const _ProjectController = {
|
|||
'write-and-cite-ars',
|
||||
'default-visual-for-beginners',
|
||||
'hotjar',
|
||||
'ai-add-on',
|
||||
'reviewer-role',
|
||||
'papers-integration',
|
||||
'editor-redesign',
|
||||
|
@ -676,14 +675,13 @@ const _ProjectController = {
|
|||
subscription && !subscription.recurlySubscription_id
|
||||
const hasManuallyCollectedSubscription =
|
||||
subscription?.collectionMethod === 'manual'
|
||||
const cannotPurchaseAddons =
|
||||
const canPurchaseAddons = !(
|
||||
hasNonRecurlySubscription || hasManuallyCollectedSubscription
|
||||
)
|
||||
const assistantDisabled = user.aiErrorAssistant?.enabled === false // the assistant has been manually disabled by the user
|
||||
const canUseErrorAssistant =
|
||||
user.features?.aiErrorAssistant ||
|
||||
(splitTestAssignments['ai-add-on']?.variant === 'enabled' &&
|
||||
!cannotPurchaseAddons &&
|
||||
!assistantDisabled)
|
||||
(user.features?.aiErrorAssistant || canPurchaseAddons) &&
|
||||
!assistantDisabled
|
||||
|
||||
let featureUsage = {}
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@ function formatGroupPlansDataForDash() {
|
|||
async function userSubscriptionPage(req, res) {
|
||||
const user = SessionManager.getSessionUser(req.session)
|
||||
|
||||
await SplitTestHandler.promises.getAssignment(req, res, 'ai-add-on')
|
||||
|
||||
await SplitTestHandler.promises.getAssignment(req, res, 'pause-subscription')
|
||||
|
||||
const { variant: flexibleLicensingVariant } =
|
||||
|
|
Loading…
Add table
Reference in a new issue