diff --git a/services/graph/pkg/service/v0/users.go b/services/graph/pkg/service/v0/users.go index c0bddc7775..47012c4112 100644 --- a/services/graph/pkg/service/v0/users.go +++ b/services/graph/pkg/service/v0/users.go @@ -188,10 +188,6 @@ func (g Graph) PostUser(w http.ResponseWriter, r *http.Request) { errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, fmt.Sprintf("%v is not a valid email address", *u.Mail)) return } - } else { - logger.Debug().Interface("user", u).Msg("could not create user: missing required Attribute: 'mail'") - errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "missing required Attribute: 'mail'") - return } // Disallow user-supplied IDs. It's supposed to be readonly. We're either diff --git a/services/graph/pkg/service/v0/users_test.go b/services/graph/pkg/service/v0/users_test.go index d516782534..e3b1a5b8f2 100644 --- a/services/graph/pkg/service/v0/users_test.go +++ b/services/graph/pkg/service/v0/users_test.go @@ -512,9 +512,6 @@ var _ = Describe("Users", func() { }) It("handles bad Mails", func() { - user.Mail = nil - assertHandleBadAttributes(user) - user.SetMail("not-a-mail-address") assertHandleBadAttributes(user) }) diff --git a/tests/acceptance/features/apiGraph/createUser.feature b/tests/acceptance/features/apiGraph/createUser.feature index 1378a4be7d..cd62336c0f 100644 --- a/tests/acceptance/features/apiGraph/createUser.feature +++ b/tests/acceptance/features/apiGraph/createUser.feature @@ -24,7 +24,7 @@ Feature: create user | withoutPassSameEmail | without pass | alice@example.org | | 200 | should | | name | pass with space | example@example.org | my pass | 200 | should | | nameWithCharacters(*:!;_+-&) | user | new@example.org | 123 | 400 | should not | - | withoutEmail | without email | | 123 | 400 | should not | + | withoutEmail | without email | | 123 | 200 | should | | Alice | same userName | new@example.org | 123 | 400 | should | | name with space | name with space | example@example.org | 123 | 400 | should not |