mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #15137 from overleaf/ab-managed-users-professional-plan
[web] Restrict managed users eligibility to professional group plans GitOrigin-RevId: 29b20067858d3aac9a17f5c78defc05d04d29bda
This commit is contained in:
parent
7268e0f0aa
commit
06e57bce87
1 changed files with 15 additions and 0 deletions
15
services/web/app/src/Features/Subscription/PlansHelper.js
Normal file
15
services/web/app/src/Features/Subscription/PlansHelper.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
const FeaturesHelper = require('./FeaturesHelper')
|
||||||
|
const PlanLocator = require('./PlansLocator')
|
||||||
|
|
||||||
|
function isProfessionalPlan(planCode) {
|
||||||
|
const plan = PlanLocator.findLocalPlanInSettings(planCode)
|
||||||
|
// only identify "modern" professional group plans as eligible, and do not include legacy plans
|
||||||
|
return Boolean(
|
||||||
|
planCode?.includes('professional') &&
|
||||||
|
FeaturesHelper.getMatchedFeatureSet(plan?.features) === 'professional'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
isProfessionalPlan,
|
||||||
|
}
|
Loading…
Reference in a new issue