Various fixes in login sources (#10428)

This commit is contained in:
guillep2k authored and GitHub committed 2020-02-23 13:52:05 -06:00
1 parent 542bd59239
commit 09dbd85a3a
15 files changed
+66 -21

No files matched your search

+1
View File
@@ -67,6 +67,7 @@ func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) {
if err := models.CreateOrganization(org, u); err != nil {
if models.IsErrUserAlreadyExist(err) ||
models.IsErrNameReserved(err) ||
models.IsErrNameCharsNotAllowed(err) ||
models.IsErrNamePatternNotAllowed(err) {
ctx.Error(http.StatusUnprocessableEntity, "", err)
} else {