Hello We're writing some management application, and defined "realms". a user may be an admin on multiple realms. Our controllers are laid like /realms/users/realm_id (administer users) /realms/products/realm_id (administer products) and so on It works, but we don't think it's excellent in terms of organization, and it gets even worse when we talk about authentication: as we must authenticate a user agains a realm, auth info can't be on the controller's beforeFilter() method 'cause we don't know the realm's id when it's processed. Workaround was creating a _has_perm($realm_id, $permission); method which was added on every method that must be authenticated.
What we tought to make it better is having a "manage" action, for example /realms/manage/realm_id/users, /reals/realm_id/products, etc. This "manage" action would check if the realm exists, if the logged in user has enough privileges to perform the desired action (users, products) and pass the control to the corresponding method using $this- >requestAction(). This would simplify my auth process a lot and would be much neater for the user. The problem is I must pass the $realm array I got from the database to the action I called, thus avoiding a second query. Anyone ever setup cake like this ? Would be glad to hear any comments/ tips regarding this. Thanks a lot gui --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
