fix(scim): ensure scim users aren't created with their own org (#7595)

This commit is contained in:
Colin Adler
2023-05-18 20:54:45 -04:00
committed by GitHub
parent 0b15b1bcd1
commit dd5b0b2721
8 changed files with 105 additions and 26 deletions

View File

@ -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)