13 Commits

Author SHA1 Message Date
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
Convly
765d7aaa52 Add check many permissions route/controller / Add userAbility to the context's state / Add isAuthenticatedAdmin.js
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:05:50 +02:00
Alexandre Bodin
3ce852af61 User :: in policies prefix and update documentation accordingly
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-10 21:38:39 +01:00
Alexandre Bodin
0c6d39297f Add graphql tests for single-types
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-10 21:38:37 +01:00
Alexandre Bodin
0b59bd61f6 Refactor policy util and error handling
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-10 21:37:16 +01:00
Alexandre Bodin
a9cef57687 Lower case policy controller name 2019-12-11 14:23:45 +01:00
Alexandre Bodin
a503c20353 Cleanup strapi-utils 2019-12-11 10:22:47 +01:00
Jonathan Lovera
83549e4ffd
Allow global policies to be organised in folders
Hi, 

I'm been using Strapi for a project I'm doing and you guys have done a great work! I love the idea.

This is a small Pull Request, however, I find it very useful if you would like to have your global policies organized by folders. Just in case you have more than 10 of them.

If you try at the moment to create a policy inside a folder, it will throw 
```
Cannot read property 'handler' of undefined
```

This will fix it and it will allow you to have folders on your `config/policies` folder.
2018-08-17 14:27:59 +10:00
soupette
942be55c8d Add eslint to strapi-utils 2018-05-03 18:13:22 +02:00
Aurelsicoko
69714842a3 Update GraphQL documentation and fix context request 2018-04-10 12:22:51 +02:00
Aurelsicoko
3daf7523c8 Apply policy for each query and use generated API business logic 2018-04-10 11:47:01 +02:00
Aurelsicoko
d51831a6f2 Write GraphQL documentation and fix details 2018-04-03 18:14:56 +02:00
Aurelsicoko
dd61fc8262 Add description and execute policies before the resolver 2018-03-30 17:05:24 +02:00