mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore: include custom roles in list org roles (#13336)
* chore: include custom roles in list org roles * move cli show roles to org scope
This commit is contained in:
@ -3,6 +3,8 @@ package coderd
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
"github.com/coder/coder/v2/coderd/database/db2sdk"
|
||||
"github.com/coder/coder/v2/coderd/httpapi"
|
||||
@ -59,6 +61,7 @@ func (api *API) patchRole(rw http.ResponseWriter, r *http.Request) {
|
||||
inserted, err := api.Database.UpsertCustomRole(ctx, database.UpsertCustomRoleParams{
|
||||
Name: args.Name,
|
||||
DisplayName: args.DisplayName,
|
||||
OrganizationID: uuid.NullUUID{},
|
||||
SitePermissions: args.SitePermissions,
|
||||
OrgPermissions: args.OrgPermissions,
|
||||
UserPermissions: args.UserPermissions,
|
||||
|
@ -198,6 +198,6 @@ func TestCustomRole(t *testing.T) {
|
||||
OrganizationPermissions: nil,
|
||||
UserPermissions: nil,
|
||||
})
|
||||
require.ErrorContains(t, err, "Invalid role name")
|
||||
require.ErrorContains(t, err, "Validation")
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user