Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🧹
  • Loading branch information
aslilac committed May 17, 2024
commit 6686bb365f85a18b3408ea6fb2ff215e177ff739
5 changes: 3 additions & 2 deletions coderd/organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ func (api *API) patchOrganization(rw http.ResponseWriter, r *http.Request) {
return
}

// Can't rename to the default org name, unless you are the default org
if req.Name != organization.Name && req.Name == codersdk.DefaultOrganization && !organization.IsDefault {
// "default" is a reserved name that always refers to the default org (much like the way we
// use "me" for users).
if req.Name == codersdk.DefaultOrganization {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: fmt.Sprintf("Organization name %q is reserved.", codersdk.DefaultOrganization),
})
Expand Down
2 changes: 1 addition & 1 deletion enterprise/coderd/roles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestCustomRole(t *testing.T) {

// Verify the role exists in the list
// TODO: Turn this assertion back on when the cli api experience is created.
//allRoles, err := tmplAdmin.ListSiteRoles(ctx)
// allRoles, err := tmplAdmin.ListSiteRoles(ctx)
//require.NoError(t, err)
//
//require.True(t, slices.ContainsFunc(allRoles, func(selected codersdk.AssignableRoles) bool {
Expand Down