For the moment I think having two queries - one to return the individual user permissions, and one to return those gained through the groups - is the right way to go.
The SQL I have managed to write to get the permissions for the usergroups that a user is part of is this, for anyone who is interested: SELECT permissions, type FROM permissions LEFT JOIN usergroups_permissions ON usergroups_permissions.permission_id = permissions.id WHERE usergroups_permissions.usergroup_id IN ( SELECT usergroup_id FROM users_usergroups WHERE users_usergroups.user_id = ? ); I could probably achieve everything I want to do with a UNION, but I havent yet looked into that, and from what I have read, theyre rather slow.... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---