CakePHP 中的 Acl - 删除此功能
我构建了一个启用 Acl 的项目 - 我使用他们网站上的 CakePHP 教程来执行此操作。
但是,该项目不再需要此功能。
我已经删除了控制器、模型和视图中对 Acl 和 Aco 的所有引用(事实上,我按照相反的顺序执行了教程以删除所有内容),然后删除了在此过程中生成的三个数据库表。
但是,我仍然收到错误:
Error: Database table acos for model Aco was not found.
在我的所有控制器上。
acl烘焙过程是否添加了一些我不知道的文件?我如何摆脱这个功能?
I built a project with Acl enabled - I used the CakePHP tutorial on their website to do this.
However, the project no longer needs this functionality.
I've removed all reference of Acl and Aco in my controllers, models and views (if fact I did the tutorial in reverse to remove everything) and I then deleted the three database tables that were generated in this process.
However, I still get the error:
Error: Database table acos for model Aco was not found.
On all of my controllers.
Did the acl baking process add some files I don't know about? How do I get rid of this functionality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试清空您的
app/tmp/cache
。模型关系可能缓存在那里。之后,grep
通过您的app
目录查找对Aco
和Aro
的引用。你可能错过了一个。编辑:此外,请确保您的
Auth
组件未将Auth->authorize
设置为actions
(这使用 ACL),但还有其他合适的东西。请参阅 CakePHP 手册中的 Auth::authorize。Try emptying your
app/tmp/cache
. Model relations may be caches there. After that,grep
through yourapp
directory for references toAco
andAro
. You may have missed one.Edit: Also, make sure that your
Auth
component does not setAuth->authorize
toactions
(which uses ACL) but something else appropriate. See Auth::authorize in the CakePHP manual.