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

Skip to content

Allow removing a user from the default organization #14635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Emyrk opened this issue Sep 10, 2024 · 1 comment · May be fixed by grepdemos/coder#4
Closed

Allow removing a user from the default organization #14635

Emyrk opened this issue Sep 10, 2024 · 1 comment · May be fixed by grepdemos/coder#4
Assignees
Labels
multi-org temporary label for multiple organizations related work

Comments

@Emyrk
Copy link
Member

Emyrk commented Sep 10, 2024

Remove this guardrail.

coder/coderd/members.go

Lines 118 to 129 in 2a9234e

if organization.IsDefault {
// Multi-organizations is currently an experiment, which means it is feasible
// for a deployment to enable, then disable this. To maintain backwards
// compatibility, this safety is necessary.
// TODO: Remove this check when multi-organizations is fully supported.
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: "Removing members from the default organization is not supported.",
Detail: "Multi-organizations is currently an experiment, and until it is fully supported, the default org should be protected.",
Validations: nil,
})
return
}

Verify:

  • UI will still load and function if a user is in 0 orgs without a premium license.
  • Verify user is removed from groups if they are removed from an org.
  • Their workspaces remain orphaned. (This is correct)
@coder-labeler coder-labeler bot added feature multi-org temporary label for multiple organizations related work labels Sep 10, 2024
@Emyrk
Copy link
Member Author

Emyrk commented Sep 10, 2024

Implementation idea: Add a trigger on deleting a org member to also remove them from groups. This implements it at the DB schema layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multi-org temporary label for multiple organizations related work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants