Skip to content

Commit

Permalink
chore: tweak feature matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyjoygh committed Aug 21, 2024
1 parent 85adb88 commit e3c2dc8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server/service/license/feature_matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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":
Expand All @@ -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
}
Expand Down

0 comments on commit e3c2dc8

Please sign in to comment.