From af5741088bf29c7816d58d660705d4e75925f89d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Vabre?= Date: Sun, 31 Dec 2017 15:29:38 +0100 Subject: [PATCH] Update policies.md corrected minor English typos --- docs/3.x.x/en/guides/policies.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/3.x.x/en/guides/policies.md b/docs/3.x.x/en/guides/policies.md index 9e780b2696..a83fbfa8fb 100644 --- a/docs/3.x.x/en/guides/policies.md +++ b/docs/3.x.x/en/guides/policies.md @@ -4,7 +4,7 @@ ## How to create a policy? -There is several ways to create a policy. +There are several ways to create a policy. - Using the CLI `strapi generate:policy isAuthenticated`. Read the [CLI documentation](../cli/CLI.md) for more information. - Manually create a JavaScript file named `isAuthenticated.js` in `./config/policies/`. @@ -20,7 +20,7 @@ module.exports = async (ctx, next) => { }; ``` -In this example, we are verifying that a session is open. If it is the case, we are calling the `next()` method that will execute the next policy or controller's action. Otherwise, a 401 error is returned. +In this example, we are verifying that a session is open. If it is the case, we call the `next()` method that will execute the next policy or controller's action. Otherwise, a 401 error is returned. > Note: You can access to any controllers, services or models thanks to the global variable `strapi` in a policy. @@ -82,7 +82,7 @@ The policy `isAuthenticated` located in `./plugins/auth/config/policies/isAuthen ### Scoped Policies -The scoped policies can only be associated to the routes defining in the API where they have been declared. +The scoped policies can only be associated to the routes defined in the API where they have been declared. **Path —** `./api/car/config/policies/isAdmin.js`. ```js