mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore: rename feature rbac to template_rbac (#4486)
* chore: rename feature rbac to template_rbac * Fix feature visibility on FE * fixup! Fix feature visibility on FE Co-authored-by: Bruno Quaresma <bruno@coder.com>
This commit is contained in:
@ -87,18 +87,18 @@ func NewWithAPI(t *testing.T, options *Options) (*codersdk.Client, io.Closer, *c
|
||||
}
|
||||
|
||||
type LicenseOptions struct {
|
||||
AccountType string
|
||||
AccountID string
|
||||
Trial bool
|
||||
AllFeatures bool
|
||||
GraceAt time.Time
|
||||
ExpiresAt time.Time
|
||||
UserLimit int64
|
||||
AuditLog bool
|
||||
BrowserOnly bool
|
||||
SCIM bool
|
||||
WorkspaceQuota bool
|
||||
RBACEnabled bool
|
||||
AccountType string
|
||||
AccountID string
|
||||
Trial bool
|
||||
AllFeatures bool
|
||||
GraceAt time.Time
|
||||
ExpiresAt time.Time
|
||||
UserLimit int64
|
||||
AuditLog bool
|
||||
BrowserOnly bool
|
||||
SCIM bool
|
||||
WorkspaceQuota bool
|
||||
TemplateRBACEnabled bool
|
||||
}
|
||||
|
||||
// AddLicense generates a new license with the options provided and inserts it.
|
||||
@ -135,9 +135,9 @@ func GenerateLicense(t *testing.T, options LicenseOptions) string {
|
||||
workspaceQuota = 1
|
||||
}
|
||||
|
||||
rbac := int64(0)
|
||||
if options.RBACEnabled {
|
||||
rbac = 1
|
||||
rbacEnabled := int64(0)
|
||||
if options.TemplateRBACEnabled {
|
||||
rbacEnabled = 1
|
||||
}
|
||||
|
||||
c := &license.Claims{
|
||||
@ -159,7 +159,7 @@ func GenerateLicense(t *testing.T, options LicenseOptions) string {
|
||||
BrowserOnly: browserOnly,
|
||||
SCIM: scim,
|
||||
WorkspaceQuota: workspaceQuota,
|
||||
RBAC: rbac,
|
||||
TemplateRBAC: rbacEnabled,
|
||||
},
|
||||
}
|
||||
tok := jwt.NewWithClaims(jwt.SigningMethodEdDSA, c)
|
||||
|
@ -33,7 +33,7 @@ func TestAuthorizeAllEndpoints(t *testing.T) {
|
||||
ctx, _ := testutil.Context(t)
|
||||
admin := coderdtest.CreateFirstUser(t, client)
|
||||
license := coderdenttest.AddLicense(t, client, coderdenttest.LicenseOptions{
|
||||
RBACEnabled: true,
|
||||
TemplateRBACEnabled: true,
|
||||
})
|
||||
group, err := client.CreateGroup(ctx, admin.OrganizationID, codersdk.CreateGroupRequest{
|
||||
Name: "testgroup",
|
||||
|
Reference in New Issue
Block a user