fix: label premium features in middleware error (#14360)

Previously, all features were called enterprise in the license check middleware.
This commit is contained in:
Asher
2024-08-19 15:58:41 -08:00
committed by GitHub
parent 4446d61fcd
commit f8f3d8967e
4 changed files with 59 additions and 10 deletions
+2 -2
View File
@@ -114,7 +114,7 @@ func TestCustomOrganizationRole(t *testing.T) {
role, err := owner.CreateOrganizationRole(ctx, templateAdminCustom(first.OrganizationID))
require.NoError(t, err, "upsert role")
// Remove the license to block enterprise functionality
// Remove the license to block premium functionality
licenses, err := owner.Licenses(ctx)
require.NoError(t, err, "get licenses")
for _, license := range licenses {
@@ -125,7 +125,7 @@ func TestCustomOrganizationRole(t *testing.T) {
// Verify functionality is lost
_, err = owner.UpdateOrganizationRole(ctx, templateAdminCustom(first.OrganizationID))
require.ErrorContains(t, err, "Custom Roles is an Enterprise feature")
require.ErrorContains(t, err, "Custom Roles is a Premium feature")
// Assign the custom template admin role
tmplAdmin, _ := coderdtest.CreateAnotherUser(t, owner, first.OrganizationID, rbac.RoleIdentifier{Name: role.Name, OrganizationID: first.OrganizationID})