Returns 409 when user already exist

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-09 16:20:51 +01:00
parent 85663d3a34
commit 346205f05a

View File

@@ -218,6 +218,10 @@ func (s *Service) CreateUser(
return fmt.Errorf("cannot load profile: %w", err)
}
} else {
if profile.Source == coredata.ProfileSourceSCIM {
return scimerrors.ScimErrorUniqueness
}
profile.Source = coredata.ProfileSourceSCIM
profile.State = profileState
profile.FullName = fullName