mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
chore: create type for unique role names (#13506)
* chore: create type for unique role names Using `string` was confusing when something should be combined with org context, and when not to. Naming this new name, "RoleIdentifier"
This commit is contained in:
@ -16,7 +16,6 @@ import (
|
||||
"github.com/coder/coder/v2/coderd/database/dbgen"
|
||||
"github.com/coder/coder/v2/coderd/database/dbmem"
|
||||
"github.com/coder/coder/v2/coderd/httpmw"
|
||||
"github.com/coder/coder/v2/coderd/rbac"
|
||||
"github.com/coder/coder/v2/codersdk"
|
||||
)
|
||||
|
||||
@ -117,7 +116,7 @@ func TestRateLimit(t *testing.T) {
|
||||
db := dbmem.New()
|
||||
|
||||
u := dbgen.User(t, db, database.User{
|
||||
RBACRoles: []string{rbac.RoleOwner()},
|
||||
RBACRoles: []string{codersdk.RoleOwner},
|
||||
})
|
||||
_, key := dbgen.APIKey(t, db, database.APIKey{UserID: u.ID})
|
||||
|
||||
|
Reference in New Issue
Block a user