Hi,

This works, too. The advantage of the other solution is, that I can leave it in 
for later.

Thank you everybody for helping me out.

Now I have "only" to find out why the person has no access. *sigh* 
Everybody has access to read. The action index is in the array of "read" and my 
user gets kicked out. I wonder what has gone wrong.

How does Auth react when an action uses another action? Does the user have to 
be authorized for all actions called or only for the "parent" action calling 
the others?

Anja

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag 
von AD7six
Gesendet: Montag, 15. Dezember 2008 12:03
An: CakePHP
Betreff: Re: Debugging Auth: getting the name of teh action I get kicked




On Dec 15, 11:58 am, "Liebermann, Anja Carolin"
<[email protected]> wrote:
> Hi Daniel,
>
> As far as I know this works only when I am IN the action. But I wonder if I 
> will get there, when Auth kicks me out before.
>
> I will try now gearoshs idea and put it in the before filter of each action.
>
> Anja

If it's just for debugging why not define this:

function redirect($url, $code = null, $exit = true) { if (Configure::read()) { 
// or any other test  debug(array($url, $this->name, $this->action));  
debug(Debugger::trace()); die; } return parent::redirect($url, $code, $exit) }

in your app controller.

AD
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:[email protected]] Im 
> Auftrag von Daniel Hofstetter
> Gesendet: Freitag, 12. Dezember 2008 16:07
> An: CakePHP
> Betreff: Re: Debugging Auth: getting the name of teh action I get 
> kicked
>
> Hi Anja,
>
> > I get kicked out of some actions in some controllers. I have alread 
> > placed function beforeFilter()
> >     {
> >         parent::beforeFilter();
> >                 $this->Auth->authError = sprintf(__('You are not 
> > authorized to access that location %s .',true),$this->name);
> >     }
>
> > Which gives me at least the controller name.
> > How can i get the name of the action which I am not authorized to see?
> > Is there a possibility to get it shown on page?
>
> > Mind: I have about 700 actions so something which I haven't to add 
> > to each action would be ideal.
>
> $this->action should do the trick.
>
> --
> Daniel Hofstetterhttp://cakebaker.42dh.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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