19 Commits

Author SHA1 Message Date
Bobby Glidwell
5af64a3837
set email validator to lowercase (#7645)
* set email validator to lowercase

Yup .lowercase() converts the string to lowercase which should be done in all instances of email across the application.

Fixes bug where users created inside Strapi admin panel end up with mixed case emails in database.

Signed-off-by: bglidwell <sintex+github@gmail.com>

* match front-end profile validation to backend

Removed .min(5) from backend validation due to redundancy with .email() check

Signed-off-by: bglidwell <sintex+github@gmail.com>

* cleanup redundant email.toLowerCase()

Signed-off-by: Bobby Glidwell <sintex+github@gmail.com>

* Revert "cleanup redundant email.toLowerCase()"

This reverts commit 4565054b298e4518e4ddf41ca602c5960bd9cc28.

Signed-off-by: Bobby Glidwell <sintex+github@gmail.com>

* fix email case in admin user controller

Signed-off-by: Bobby Glidwell <sintex+github@gmail.com>

* fix email case in api user controller

Signed-off-by: Bobby Glidwell <sintex+github@gmail.com>

* fix for graphql tests

Signed-off-by: Bobby Glidwell <sintex+github@gmail.com>
2020-09-14 09:30:12 +02:00
Pierre Noël
9983d3b44e clean conditions at get and update
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-20 17:40:01 +02:00
Pierre Noël
96c68df220 simplify validator
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:47:46 +02:00
Pierre Noël
4d4c7678c0 refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:47:46 +02:00
Pierre Noël
b6a5e78fe3 fix bad nesting
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:47:19 +02:00
Pierre Noël
1ee5b7f189 fifth refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:10:09 +02:00
Pierre Noël
dd88c00514 use new condition format
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:52 +02:00
Pierre Noël
b893501552 first refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:51 +02:00
Pierre Noël
3b8cab0621 add conditions logic for author/editor
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:50 +02:00
Pierre Noël
3aec039698 refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:05:09 +02:00
Pierre Noël
42e3b64689 refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:05:08 +02:00
Convly
65f0e7e3f3 Use custom type for strapiID & move it to strapi-utils 2020-07-08 11:04:21 +02:00
Convly
483457cafd Add GET /admin/users/:id route 2020-07-08 11:04:21 +02:00
Convly
ede7fd0b90 Add custom strapiID type to yup 2020-07-08 11:04:20 +02:00
Convly
6897cbf6ad Add update user route in the user api 2020-07-08 11:04:20 +02:00
Pierre Noël
9d431ee8ff add single delete + refacto batch-delete
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 10:58:07 +02:00
Pierre Noël
308beddb24 add DELETE /admin/roles
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 10:58:07 +02:00
Alexandre Bodin
252bb3afe3 Remove email update of admin during test that break next tests
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:51:03 +02:00
Alexandre Bodin
851ba201ac Add /users/me routes
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:51:01 +02:00