Fix the features selection
This commit is contained in:
+11
-11
@@ -75,27 +75,27 @@ function getFeatures() {
|
||||
function updateFeatures(subscriptionInfo) {
|
||||
assert.strictEqual(typeof subscriptionInfo, 'object');
|
||||
|
||||
// FIXME adjust the time
|
||||
if (moment(subscriptionInfo.cloudronCreatedAt).isBefore('2020-02-10')) {
|
||||
if (subscriptionInfo.plan.id === '2020-03_personal') {
|
||||
gFeatures.userMaxCount = 5;
|
||||
gFeatures.externalLdap = false;
|
||||
gFeatures.eventLog = false;
|
||||
gFeatures.privateDockerRegistry = false;
|
||||
gFeatures.branding = false;
|
||||
} else if (subscriptionInfo.plan.id === '2020-03_business' || subscriptionInfo.plan.id === 'education' || subscriptionInfo.plan.id === 'contributor') {
|
||||
gFeatures.userMaxCount = null; // unlimited
|
||||
gFeatures.externalLdap = true;
|
||||
gFeatures.eventLog = true;
|
||||
gFeatures.privateDockerRegistry = true;
|
||||
gFeatures.branding = false;
|
||||
gFeatures.branding = true;
|
||||
} else {
|
||||
if (subscriptionInfo.plan.id === '2020-03_personal') {
|
||||
gFeatures.userMaxCount = 5;
|
||||
gFeatures.externalLdap = false;
|
||||
gFeatures.eventLog = false;
|
||||
gFeatures.privateDockerRegistry = false;
|
||||
gFeatures.branding = false;
|
||||
} else if (subscriptionInfo.plan.id === '2020-03_business' || subscriptionInfo.plan.id === 'education' || subscriptionInfo.plan.id === 'contributor') {
|
||||
// FIXME adjust the time
|
||||
if (moment(subscriptionInfo.cloudronCreatedAt).isBefore('2020-02-10')) { // previously we only had app restrictions
|
||||
gFeatures.userMaxCount = null; // unlimited
|
||||
gFeatures.externalLdap = true;
|
||||
gFeatures.eventLog = true;
|
||||
gFeatures.privateDockerRegistry = true;
|
||||
gFeatures.branding = true;
|
||||
} else {
|
||||
} else { // this is the 2020 free tier
|
||||
gFeatures.userMaxCount = 3;
|
||||
gFeatures.externalLdap = false;
|
||||
gFeatures.eventLog = false;
|
||||
|
||||
Reference in New Issue
Block a user