mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08: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:
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
"github.com/coder/coder/v2/coderd/rbac"
|
||||
"github.com/coder/coder/v2/coderd/searchquery"
|
||||
"github.com/coder/coder/v2/codersdk"
|
||||
)
|
||||
@@ -381,7 +380,7 @@ func TestSearchUsers(t *testing.T) {
|
||||
Expected: database.GetUsersParams{
|
||||
Search: "user-name",
|
||||
Status: []database.UserStatus{database.UserStatusActive},
|
||||
RbacRole: []string{rbac.RoleOwner()},
|
||||
RbacRole: []string{codersdk.RoleOwner},
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -390,7 +389,7 @@ func TestSearchUsers(t *testing.T) {
|
||||
Expected: database.GetUsersParams{
|
||||
Search: "user name",
|
||||
Status: []database.UserStatus{database.UserStatusSuspended},
|
||||
RbacRole: []string{rbac.RoleMember()},
|
||||
RbacRole: []string{codersdk.RoleMember},
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -399,7 +398,7 @@ func TestSearchUsers(t *testing.T) {
|
||||
Expected: database.GetUsersParams{
|
||||
Search: "user-name",
|
||||
Status: []database.UserStatus{database.UserStatusActive},
|
||||
RbacRole: []string{rbac.RoleOwner()},
|
||||
RbacRole: []string{codersdk.RoleOwner},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user