mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: set groupsync to use default org (#12146)
* fix: assign new oauth users to default org This is not a final solution, as we eventually want to be able to map to different orgs. This makes it so multi-org does not break oauth/oidc.
This commit is contained in:
@@ -42,12 +42,11 @@ SELECT
|
||||
FROM
|
||||
groups;
|
||||
|
||||
-- name: DeleteGroupMembersByOrgAndUser :exec
|
||||
-- name: RemoveUserFromAllGroups :exec
|
||||
DELETE FROM
|
||||
group_members
|
||||
WHERE
|
||||
group_members.user_id = @user_id
|
||||
AND group_id = ANY(SELECT id FROM groups WHERE organization_id = @organization_id);
|
||||
user_id = @user_id;
|
||||
|
||||
-- name: InsertGroupMember :exec
|
||||
INSERT INTO
|
||||
|
||||
Reference in New Issue
Block a user