Thanks, Justin. But now I'm getting "You are not authorized to access
that location." flash error and kicked back to /login. In
AuthComponent's authorize() I could see that it's attempting to access
$user[$this->settings['aclModel']])
and failing that triggers error:
Notice (1024): Missing acl information (Role/role_id) in user session
[APP/Controller/Component/Auth/TinyAuthorize.php, line 78]
settings['aclModel'] is 'Role' as per default so it basically tries
$user->['Role']
My $user looks like this:
array(
'id' => (int) 6,
'username' => 'rihad',
'role' => 'can-do-this',
'created' => '2012-05-15 16:30:10',
'modified' => '2012-05-17 10:39:17',
)
it indeed lacks 'Role' field. Should I simply change $this-
>authorize['aclModel'] = 'Role' ?
I have this in Config/core.php:
Configure::write('Role', array(
'can-do-this' => 1,
'can-do-that => 2,
));
to emulate a missing table.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php