Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b39029f

Browse files
committed
chore: allow removing users from the default org
Removed as no longer in experimental
1 parent 370f0b9 commit b39029f

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

coderd/members.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,6 @@ func (api *API) deleteOrganizationMember(rw http.ResponseWriter, r *http.Request
116116
aReq.Old = member.OrganizationMember.Auditable(member.Username)
117117
defer commitAudit()
118118

119-
if organization.IsDefault {
120-
// Multi-organizations is currently an experiment, which means it is feasible
121-
// for a deployment to enable, then disable this. To maintain backwards
122-
// compatibility, this safety is necessary.
123-
// TODO: Remove this check when multi-organizations is fully supported.
124-
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
125-
Message: "Removing members from the default organization is not supported.",
126-
Detail: "Multi-organizations is currently an experiment, and until it is fully supported, the default org should be protected.",
127-
Validations: nil,
128-
})
129-
return
130-
}
131-
132119
if member.UserID == apiKey.UserID {
133120
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{Message: "cannot remove self from an organization"})
134121
return

0 commit comments

Comments
 (0)