I had a similar quandry and came up with a simple solution - not to
use Cake's admin routing.  Instead, I've written an admin controller
that gives me a backend admin screen.  Whenever I call to a method in
another controller, I just use /path/method.

In each method, I call a session check method to see if the user has access.

Some may disagree with this method, but I feel it gives me more
control and I don't have to repeat methods with a normal and admin
version.

What I haven't done yet is a finer level of control per user group, that next.

Tane

On 3/23/07, Sonic Baker <[EMAIL PROTECTED]> wrote:
> Hi,
>
> In my current app, I've enables admin routing. There are certain actions I
> want to appear in the /admin path. Rather than repeat the logic of the
> existing actions in the admin_xxxx() actions, I thought it'd be best to just
> call these actions from the admin_xxxx() actions required.
> So, I was wondering if I would be best to simply call either requestAction()
> on the required actions, or call the action directly?
>
> e.g.
> Regular Action:
>
>     function add() {
>         ....
>         ....
>         // some logic
>     }
>
>
> Admin Action:
>
>     function admin_add() {
>         $this->requestAction($this->viewPath . '/add);
>         $this->render('admin_add');
>     }
>
> or
>
>     function add() {
>         return $this->add();
>         $this->render('admin_add');
>     }
>
> Alternatively, has anyone come up with anything better?
> What do you think?
>
> Cheers,
>
> Sonic
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to