19 Commits

Author SHA1 Message Date
Pierre Noël
d35e1d36f1 remove user delete route
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:51 +02:00
Pierre Noël
98f8275190 prevent removing the last superadmin
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:50 +02:00
Convly
c398b969a4 Add unique email check on update user 2020-07-08 11:04:22 +02:00
Convly
598e9b9d93 Fix user controller tests 2020-07-08 11:04:22 +02:00
Convly
d69101427f Fix PR: Refactor user e2e tests, fix domain logic, add user::deleteOne route 2020-07-08 11:04:22 +02:00
Convly
a6c2fab79c Add tests for user controller/service/api
Fix e2e tests, add default role to match .min(1) condition
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
ce44b330ad Extract sanitizeUserRoles to outer scope, fix typo 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
Alexandre Bodin
851ba201ac Add /users/me routes
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:51:01 +02:00
Alexandre Bodin
cf4c70b01e Init routes
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:50:59 +02:00
Convly
651d42dbea fix PR comments, move pagination logic to the database layer, handle searches
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:50:44 +02:00
Convly
c9b02b2e25 Fix response object shape for get /admin/users
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:49:26 +02:00
Convly
60b24dd3c3 Add GET /admin/users route and new pagination system
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:49:22 +02:00
Alexandre Bodin
01854f431f Add registration info route
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:44:59 +02:00
Convly
bc03d60b98 Fix badRequest error shape
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:38:10 +02:00
Convly
40089ed4aa Add e2e tests, fix validation for mongoose, update services
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:38:08 +02:00
Convly
8b4db69e8c Add schema validation for POST /admin/users
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:38:02 +02:00
Convly
50b170e543 Uniformize code with rbac/login
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:37:59 +02:00