Skip to content

Commit 246f8e2

Browse files
committed
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
1 parent 59e7f6a commit 246f8e2

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

docs/en/tutorials-and-examples/cms/authorization.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Implement authorization in CakePHP CMS with policy classes. Contro
77

88
With users now able to login to our CMS, we want to apply authorization rules
99
to ensure that each user only edits the posts they own. We'll use the
10-
[authorization plugin](https://book.cakephp.org/authorization/2) to do this.
10+
[authorization plugin](https://book.cakephp.org/authorization/3) to do this.
1111

1212
## Installing Authorization Plugin
1313

@@ -40,9 +40,11 @@ use Authorization\Policy\OrmResolver;
4040

4141
Add the `AuthorizationServiceProviderInterface` to the implemented interfaces on your application:
4242

43-
class Application extends BaseApplication
44-
implements AuthenticationServiceProviderInterface,
45-
AuthorizationServiceProviderInterface
43+
```php {2-3}
44+
class Application extends BaseApplication
45+
implements AuthenticationServiceProviderInterface,
46+
AuthorizationServiceProviderInterface
47+
```
4648

4749
Then add the following to your `middleware()` method:
4850

0 commit comments

Comments
 (0)