From 246f8e22fd42f12ca14a13fa7322cf652017bf77 Mon Sep 17 00:00:00 2001 From: mscherer Date: Mon, 9 Feb 2026 21:56:29 +0100 Subject: [PATCH] Fix authorization tutorial issues - Update authorization plugin link from /2 to /3 for CakePHP 5 - Convert indented code to proper fenced code block with line highlighting --- docs/en/tutorials-and-examples/cms/authorization.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/en/tutorials-and-examples/cms/authorization.md b/docs/en/tutorials-and-examples/cms/authorization.md index 04ca290702..ce48383fef 100644 --- a/docs/en/tutorials-and-examples/cms/authorization.md +++ b/docs/en/tutorials-and-examples/cms/authorization.md @@ -7,7 +7,7 @@ description: "Implement authorization in CakePHP CMS with policy classes. Contro With users now able to login to our CMS, we want to apply authorization rules to ensure that each user only edits the posts they own. We'll use the -[authorization plugin](https://book.cakephp.org/authorization/2) to do this. +[authorization plugin](https://book.cakephp.org/authorization/3) to do this. ## Installing Authorization Plugin @@ -40,9 +40,11 @@ use Authorization\Policy\OrmResolver; Add the `AuthorizationServiceProviderInterface` to the implemented interfaces on your application: - class Application extends BaseApplication - implements AuthenticationServiceProviderInterface, - AuthorizationServiceProviderInterface +```php {2-3} +class Application extends BaseApplication + implements AuthenticationServiceProviderInterface, + AuthorizationServiceProviderInterface +``` Then add the following to your `middleware()` method: