mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 04:41:32 +02:00
Merge pull request #22024 from overleaf/em-standalone-ai-add-on-is-not-premium
Do not hide upgrade buttons when on standalone AI add-on GitOrigin-RevId: ec5cf42c051745d5ca1dff57f7cd27a89c21a6a9
This commit is contained in:
@@ -45,6 +45,9 @@ const OnboardingDataCollectionManager = require('../OnboardingDataCollection/Onb
|
||||
const UserUpdater = require('../User/UserUpdater')
|
||||
const Modules = require('../../infrastructure/Modules')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const {
|
||||
isStandaloneAiAddOnPlanCode,
|
||||
} = require('../Subscription/RecurlyEntities')
|
||||
|
||||
/**
|
||||
* @import { GetProjectsRequest, GetProjectsResponse, Project } from "./types"
|
||||
@@ -612,12 +615,15 @@ const _ProjectController = {
|
||||
const userInNonIndividualSub =
|
||||
userIsMemberOfGroupSubscription || userHasInstitutionLicence
|
||||
|
||||
const userHasPremiumSub =
|
||||
subscription && !isStandaloneAiAddOnPlanCode(subscription.planCode)
|
||||
|
||||
// Persistent upgrade prompts
|
||||
// in header & in share project modal
|
||||
const showUpgradePrompt =
|
||||
Features.hasFeature('saas') &&
|
||||
userId &&
|
||||
!subscription &&
|
||||
!userHasPremiumSub &&
|
||||
!userInNonIndividualSub
|
||||
|
||||
let aiFeaturesAllowed = false
|
||||
|
||||
Reference in New Issue
Block a user