Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aaa5174

Browse files
authored
chore: move custom-roles feature to permium license (#14201)
Currently an unsafe experiment, so it can be moved safely
1 parent 591385f commit aaa5174

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

codersdk/deployment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (set FeatureSet) Features() []FeatureName {
154154
enterpriseFeatures = slices.DeleteFunc(enterpriseFeatures, func(f FeatureName) bool {
155155
switch f {
156156
// Add all features that should be excluded in the Enterprise feature set.
157-
case FeatureMultipleOrganizations:
157+
case FeatureMultipleOrganizations, FeatureCustomRoles:
158158
return true
159159
default:
160160
return false

enterprise/coderd/license/license_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ func TestLicenseEntitlements(t *testing.T) {
810810
ExpectedErrorContains: "",
811811
AssertEntitlements: func(t *testing.T, entitlements codersdk.Entitlements) {
812812
assert.False(t, entitlements.Features[codersdk.FeatureMultipleOrganizations].Enabled, "multi-org only enabled for premium")
813+
assert.False(t, entitlements.Features[codersdk.FeatureCustomRoles].Enabled, "custom-roles only enabled for premium")
813814
},
814815
},
815816
{
@@ -822,6 +823,7 @@ func TestLicenseEntitlements(t *testing.T) {
822823
ExpectedErrorContains: "",
823824
AssertEntitlements: func(t *testing.T, entitlements codersdk.Entitlements) {
824825
assert.True(t, entitlements.Features[codersdk.FeatureMultipleOrganizations].Enabled, "multi-org enabled for premium")
826+
assert.True(t, entitlements.Features[codersdk.FeatureCustomRoles].Enabled, "custom-roles enabled for premium")
825827
},
826828
},
827829
}

0 commit comments

Comments
 (0)