From c94f3e678774105d69759dd768602e4c9e012282 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 7 Aug 2024 08:11:33 -0500 Subject: [PATCH] chore: move custom-roles feature to permium license Currently an unsafe experiment, so it can be moved safely --- codersdk/deployment.go | 2 +- enterprise/coderd/license/license_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/codersdk/deployment.go b/codersdk/deployment.go index d3ef2f078ff1a..62f21842fe529 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -154,7 +154,7 @@ func (set FeatureSet) Features() []FeatureName { enterpriseFeatures = slices.DeleteFunc(enterpriseFeatures, func(f FeatureName) bool { switch f { // Add all features that should be excluded in the Enterprise feature set. - case FeatureMultipleOrganizations: + case FeatureMultipleOrganizations, FeatureCustomRoles: return true default: return false diff --git a/enterprise/coderd/license/license_test.go b/enterprise/coderd/license/license_test.go index 5089b33c022fa..db914170a34f2 100644 --- a/enterprise/coderd/license/license_test.go +++ b/enterprise/coderd/license/license_test.go @@ -810,6 +810,7 @@ func TestLicenseEntitlements(t *testing.T) { ExpectedErrorContains: "", AssertEntitlements: func(t *testing.T, entitlements codersdk.Entitlements) { assert.False(t, entitlements.Features[codersdk.FeatureMultipleOrganizations].Enabled, "multi-org only enabled for premium") + assert.False(t, entitlements.Features[codersdk.FeatureCustomRoles].Enabled, "custom-roles only enabled for premium") }, }, { @@ -822,6 +823,7 @@ func TestLicenseEntitlements(t *testing.T) { ExpectedErrorContains: "", AssertEntitlements: func(t *testing.T, entitlements codersdk.Entitlements) { assert.True(t, entitlements.Features[codersdk.FeatureMultipleOrganizations].Enabled, "multi-org enabled for premium") + assert.True(t, entitlements.Features[codersdk.FeatureCustomRoles].Enabled, "custom-roles enabled for premium") }, }, }