mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix(scim): ensure scim users aren't created with their own org (#7595)
This commit is contained in:
@ -921,7 +921,11 @@ func (api *API) oauthLogin(r *http.Request, params oauthLoginParams) (*http.Cook
|
||||
Username: params.Username,
|
||||
OrganizationID: organizationID,
|
||||
},
|
||||
LoginType: params.LoginType,
|
||||
// All of the userauth tests depend on this being able to create
|
||||
// the first organization. It shouldn't be possible in normal
|
||||
// operation.
|
||||
CreateOrganization: len(organizations) == 0,
|
||||
LoginType: params.LoginType,
|
||||
})
|
||||
if err != nil {
|
||||
return xerrors.Errorf("create user: %w", err)
|
||||
|
Reference in New Issue
Block a user