Much thanks to cmbg.

A senior colleague showed me how to do what I was looking for.  In the hopes
it will help someone else, here's what appears in my controller:

/*
============================================================================
==============
        CALLBACKS
*/

        function beforeFilter()
        {
                $exceptions = array('admin_index', 'admin_view',
'admin_add', 'admin_edit', 'admin_delete');
                parent::beforeFilter();
                if(!in_array($this->action, $exceptions))
$this->checkSession();
        }

===========================================================================

Thanks,

A.K.


-----Original Message-----
From: cmbg [mailto:[EMAIL PROTECTED] 
Sent: April 11, 2008 4:17 PM
To: A.K.
Subject: Re: Escaping the beforeFilter

You can check which action is being called in beforeFilter using $this-
>action.  Then you can determine what's accessible or not by checking
the login...
The other alternative is to do your checking in each individual action
rather then in the catchall beforeFilter.

On Apr 11, 10:26 am, "A.K." <[EMAIL PROTECTED]> wrote:
> Hi, my Web site has 1.1.19.x installed; I have some admin functions
> ("admin_add()", etc.) which I need to get the controller to display.
> However, the controller has a beforeFilter() call on it to ensure that
> the rest of the non-admin functions don't get called unless a user is
> logged in (ie, beforeFilter() calls the checkSession() function).
>
> Is there any, relatively easy way to escape the beforeFilter?  The
> only way that comes up in search is the deprecated "var $beforeFilter"
> method, so that's right out.
>
> Thanks.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to