5.0 is compatible with CakePHP ^3.4 and refactored some Auth objects into a new plugin
- Fix your Users configuration file, usually under
config/users.php
for Auth object references
in config/users.php
$config = [
// ...
'Auth' => [
// ...
'authenticate' => [
'all' => [
'finder' => 'auth',
],
'CakeDC/Auth.ApiKey',
'CakeDC/Auth.RememberMe',
'Form',
],
'authorize' => [
'CakeDC/Auth.Superuser',
'CakeDC/Auth.SimpleRbac',
],
// ...
- Add a new configuration key to specify the controller name you are using to handle auth in your project
in config/users.php
$config = [
'Users' => [
// ...
// Controller used to manage users plugin features & actions
'controller' => 'CakeDC/Users.Users',
// ...
- If you are using simple RBAC, set
CakeDC/Auth.SimpleRbac.permissions
configuration key tonull
if you want to load permissions from the fileconfig/permissions.php
.
in config/users.php
$config = [
'Auth.authorize' => [
'CakeDC/Auth.SimpleRbac' => [
'autoload_config' => 'permissions',
'permissions' => null,
],
],
If the value is false or empty array, now it is assumed there is no permissions for the user.