39 Commits

Author SHA1 Message Date
Alexandre Bodin
07e7cfc0bd Make lint stricter and fix the errors
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-02 19:41:42 +01:00
Alexandre Bodin
8af60259cd Add CLI documentation
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-14 13:14:03 +02:00
Alexandre Bodin
c81af9a1d0 Init admin reset
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-14 13:14:02 +02:00
Pierre Noël
c9545f2b7d refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-08-03 14:08:18 +02:00
Convly
ba8954794b Add telemetry events for user creation
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-08-03 14:08:18 +02:00
Pierre Noël
57501bad5d count instead of find
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-16 12:57:55 +02:00
Pierre Noël
c73aadbed5 add batch delete for users
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-16 12:57:54 +02:00
Alexandre Bodin
9ec714fb2f Disallow disabling last super admin
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 16:43:20 +02:00
Pierre Noël
2be4f8047a migrate users for new column isActive
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:48:15 +02:00
soupette
f8ea8c88c1 Add delete users
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:36:58 +02:00
Pierre Noël
eb895d7768 populate only roles
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:10:12 +02:00
Pierre Noël
25bea051e0 prevent delete user route to delete last superAdmin
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:10:11 +02:00
Pierre Noël
047a0be908 move function from bootstrap to service
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:10:11 +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
8598cee8d0 fourth refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:52 +02:00
Pierre Noël
6a1d65bc37 third refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:52 +02:00
Pierre Noël
243c4ccc4e add upload permissions to default roles + second refacto
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
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
Pierre Noël
711c58b05e create role at startup + warning
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:09:49 +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
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
Pierre Noël
291779aa45 move count to role services
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 10:59:36 +02:00
Pierre Noël
7f0bb01a07 refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 10:59:36 +02:00
Alexandre Bodin
35d87bfdcd Cleanup
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:53:23 +02:00
Alexandre Bodin
7a056c2f45 Add admin registeration API
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:53:19 +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
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
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
a841400f85 Add register route
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:45:03 +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
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
50b170e543 Uniformize code with rbac/login
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:37:59 +02:00
Convly
fb58de9814 Cleanup strapi-admin services & domain
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:37:20 +02:00
Convly
12953bd6f5 Add new POST /admin/users route (controller + related services). Update User model: remove required constraint on password field.
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:37:16 +02:00
Alexandre Bodin
e597bddc59 Add tests
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:24:47 +02:00