14807 Commits

Author SHA1 Message Date
soupette
4e71345ee6 Fix check API call
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:48:45 +02:00
Alexandre Bodin
9ec4c9ec8b Exclude creator in fields perm
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:45 +02:00
Alexandre Bodin
5c6851e6ba Update naming of permissions
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:45 +02:00
Convly
31d748f52e Add private to User.settings::blocked
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:45 +02:00
Convly
c9ebae4c9f Fix authorization issues due to null subject registration
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:45 +02:00
Convly
0cf76721e9 Add missing subject on upload permissions
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:45 +02:00
Convly
e63306b559 Rewrote users-permissions's controller to fit with rbac, fix various bugs in content-manager's controllers
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:44 +02:00
Convly
8797d25501 Add hasPermissions policy to concerned routes
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:44 +02:00
Convly
a300e356c7 Removes the plugins::users-permissions.user subject from editor & author's content-manager permissions
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:44 +02:00
Convly
91bd4281c3 Fix permissions-manager query generation
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:44 +02:00
Convly
9cce0145c5 Fix elemMatch op bug (typo)
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:44 +02:00
Alexandre Bodin
1c90614f8b Fix sanitizeEntity
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:44 +02:00
Convly
3953e5068b Add descriptive comment for hasPermissions transformers
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:43 +02:00
Convly
647b5a2b6e Remove useless check
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:43 +02:00
Convly
0e61698ef5 Fix upload w/ permissions bugs
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:43 +02:00
Alexandre Bodin
097c7f4477 Add sanitize
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:43 +02:00
Alexandre Bodin
8109af101c Handle specific find case of ST
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:43 +02:00
Alexandre Bodin
cdc9bc2167 Allow multiple args in policies
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:43 +02:00
Alexandre Bodin
1b460c76ff Fix find relation list for compo
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:42 +02:00
Alexandre Bodin
3ff5f645c8 Add single type usecase and fix delete
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:42 +02:00
Alexandre Bodin
44a7e2321d Update findOne
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:42 +02:00
Convly
5f01d9ebe1 Add permissions on upload controller
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:42 +02:00
Alexandre Bodin
c31c86c8e5 Allow compo option
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:42 +02:00
Alexandre Bodin
29fcf7c3cd Clean find relation list and tests
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:42 +02:00
Convly
56d583e49e Add basis for upload controllers permissions
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:41 +02:00
Alexandre Bodin
e8063ceb28 Add relation-list route in the CM
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:41 +02:00
Convly
36facdfd00 Add new sanitize-entity.js
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:41 +02:00
Convly
46f0c87b7d Handle $or operation on pm query, better parsing for the query
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:41 +02:00
Convly
20f80b2361 Better permissions-manager.sanitize behavior
Forbid empty arrays as fields for permissions (on ability creation)
Differentiate input from output sanitizing

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:38 +02:00
Convly
f2eb3c5726 Use AbilityBuilder instead of defineAbility, fix content-manager::create route
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:18 +02:00
Convly
c11e6dfa88 Use AbilityBuilder instead of defineAbility, fix content-manager::create route
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:17 +02:00
Convly
8f7da9674c Add plugins::content-manager.hasPermissions policy
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:17 +02:00
Convly
25c04c8d78 Fix actions name typo
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:17 +02:00
Convly
8b81395171 Fix filename typo
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:17 +02:00
Convly
b5fb5f8509 Add permissions to the content-manager routes
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:17 +02:00
Convly
11ba971302 Rework policy handling, add util to create policy factories, allow array declaration for hasPermissions
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:16 +02:00
Convly
241fb2379d Removes useless async from hasPermissions ability
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:16 +02:00
Convly
b3f602d207 Rework policies resolving (allow policy generators) / Add hasPermissions policy
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:16 +02:00
Alexandre Bodin
85ea0abdc8 Add condition
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:16 +02:00
Alexandre Bodin
4edad86029 Add basic created_by updated_by
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:16 +02:00
soupette
26713b66eb Fix delete in upload plugin
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:48:15 +02:00
soupette
8f531f0bee Fix ui
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:48:15 +02:00
HichamELBSI
a9e7202e68 Fix checkbox label color
Signed-off-by: HichamELBSI <elabbassih@gmail.com>
2020-07-08 11:48:15 +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
Pierre Noël
9267674a15 prepare code for migration
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:48:14 +02:00
soupette
df711ded11 Upgrade tests
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:48:14 +02:00
soupette
e139c905a8 Upgrade buffet.js
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:48:14 +02:00
soupette
b659ae631d Add readonly mode for users
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:48:12 +02:00
soupette
5da5870218 Fix readonly state components design
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:47:46 +02:00
soupette
b7686d0191 Fix validations for users
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-07-08 11:47:46 +02:00