问题
During development, when i try to access a page that has not been set as ACO or rights are denied, I just get forwarded to the previous page, where I was instead of getting error or at least a flash.
I can't figure out this way what went wrong. How do i set it so i get error messages and how to debug? debug is set to 2
?
10x
回答1:
use echo $this->Session->flash('auth');
it is mentioned on 1.3 book. On 2.0 book look in the :
Displaying auth related flash messages
of authentication page
来源:https://stackoverflow.com/questions/7913532/cakephp-how-do-i-show-error-or-flash-for-acl-deny-access-instead-of-only-forwar