CakePHP: How do i show error or flash for ACL deny access instead of only forwarding

穿精又带淫゛_ 提交于 2019-12-13 02:54:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!