From e3c2dc8441b2d42a7fffcc1c817a8b3d3c1de964 Mon Sep 17 00:00:00 2001 From: johnnyjoy Date: Wed, 21 Aug 2024 20:02:17 +0800 Subject: [PATCH] chore: tweak feature matrix --- server/service/license/feature_matrix.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/service/license/feature_matrix.go b/server/service/license/feature_matrix.go index 41e335e..1b8daea 100644 --- a/server/service/license/feature_matrix.go +++ b/server/service/license/feature_matrix.go @@ -35,12 +35,12 @@ func (f FeatureType) String() string { // FeatureMatrix is a matrix of features in [Free, Pro, Enterprise]. var FeatureMatrix = map[FeatureType][3]bool{ - FeatureTypeSSO: {false, false, false}, - FeatureTypeAdvancedAnalytics: {false, false, false}, - FeatureTypeUnlimitedAccounts: {false, true, false}, + FeatureTypeUnlimitedAccounts: {false, true, true}, FeatureTypeUnlimitedShortcuts: {false, true, true}, FeatureTypeUnlimitedCollections: {false, true, true}, - FeatureTypeCustomeBranding: {false, true, true}, + FeatureTypeCustomeBranding: {false, false, true}, + FeatureTypeSSO: {false, false, false}, + FeatureTypeAdvancedAnalytics: {false, false, false}, } func getDefaultFeatures(plan v1pb.PlanType) []FeatureType { @@ -55,10 +55,6 @@ func getDefaultFeatures(plan v1pb.PlanType) []FeatureType { func validateFeatureString(feature string) (FeatureType, bool) { switch feature { - case "ysh.slash.sso": - return FeatureTypeSSO, true - case "ysh.slash.advanced-analytics": - return FeatureTypeAdvancedAnalytics, true case "ysh.slash.unlimited-accounts": return FeatureTypeUnlimitedAccounts, true case "ysh.slash.unlimited-shortcuts": @@ -67,6 +63,10 @@ func validateFeatureString(feature string) (FeatureType, bool) { return FeatureTypeUnlimitedCollections, true case "ysh.slash.custom-branding": return FeatureTypeCustomeBranding, true + case "ysh.slash.sso": + return FeatureTypeSSO, true + case "ysh.slash.advanced-analytics": + return FeatureTypeAdvancedAnalytics, true default: return "", false }