CakePHP 4 - Implementing RBAC with the CakeDC/Auth Plugin

Опубликовано: 04 Июнь 2026
на канале: James McDonald
1,762
14

Example of CakePHP 4 with RequestAuthorizationMiddleware & RBAC Policies implemented using CakeDC/Auth plugin

Code: https://github.com/toggenation/CakePH...

00:00 Add database and connect
04:10 Create and apply table migration
09:30 Bake Models, Views & Controllers
10:20 Authentication - Install & Configure
12:17 Encrypting passwords with Entity setter
15:59 Specify username/password identifier fields
29:07 Authorization - Install & Configure
35:00 CakeDC/auth RBAC - Install & Configure
37:00 RequestAuthorizationMiddleware
39:02 Map Cake\Http\ServerRequest to Policies
44:22 Configure permissions.php RBAC Rules
56:12 Implement AuthorizationMiddleware UnauthorizedHandler configuration array
1:02:03 Create Custom Redirect Class extending CakeRedirectHandler
1:09:36 Create AllowDebugKitPolicy to enable DebugKit when logged in as a restricted user and stop double Flash message
1:20:16 Implement CakeDC/auth Owner class to allow author to edit/delete own posts