I tracked down the issue to BaseAuthenticate::_findUser()
Even though it correctly joins user table to roles and fetches them
both, Role isn't nested in user, so to speak:
$result is:
array(
'Milli' => array(
'id' => (int) 6,
'username' => 'rihad',
'created' => '2012-05-15 16:30:10',
'modified' => '2012-05-18 10:14:07',
),
'Role' => array(
(int) 0 => array(
'id' => (int) 1,
'alias' => 'operations',
'RolesUser' => array(
'id' => (int) 6,
'role_id' => (int) 1,
'user_id' => (int) 6
)
)
)
)
so when _findUser() returns $result[$model] back to FormAuthenticate,
all it gets is:
array(
'id' => (int) 6,
'username' => 'rihad',
'created' => '2012-05-15 16:30:10',
'modified' => '2012-05-18 10:14:07',
)
What should I do? I'm sure it's a misconfiguration because folks have
probably used TinyAuthorize with HABTM roles.
On May 17, 8:33 pm, rihad <[email protected]> wrote:
> I've tried copying auth stuff to User, and modified routes
> accordingly, it didn't help.
> User is a prefixed (/admin) controller for creating operators that
> will be using the app based on their roles in non-prefixed URLs.
> The authentication of /admin itself happens in Apache. The creator of
> operators through CRUD doesn't need to use the app itself.
>
> On May 17, 7:34 pm, Justin Edwards <[email protected]> wrote:
>
>
>
>
>
>
>
> > I've never tried to make the User model be named anything else. I have
> > users and roles many to many on both sides though.
>
> >https://github.com/justinledwards/tinyauthdb/tree/2.1/app/Model
>
> >https://github.com/justinledwards/tinyauthdb/blob/2.1/app/Model/Role....
--
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