cakephp 3中的授权和ACL [英] Authorization and ACL in cakephp 3

查看:86
本文介绍了cakephp 3中的授权和ACL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了文档,但在cakephp 3中未找到有关ACL实施的任何信息。
如何在cakephp 3中使用ACL进行授权?

解决方案

CakePHP 3中并未内置ACL,而是在CakePHP 2中提供了ACL。现在,它可以作为单独的插件使用。


http:引用//book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html



与ACL相关的类是移动到单独的插件。密码散列,
身份验证和授权提供程序已移至
\Cake\Auth命名空间。您还需要将提供程序和
哈希表也移至App\Auth命名空间。


https://github.com/cakephp/acl 上的插件,但请注意,它还不稳定。 / p>

I search the document but I don't find anything about ACL implementation in cakephp 3. How can I implement authorization with ACL in cakephp 3?

解决方案

ACL is not built into CakePHP 3 as it was in CakePHP 2. It is now available as a separate plugin.

Quote from http://book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html

ACL related classes were moved to a separate plugin. Password hashers, Authentication and Authorization providers where moved to the \Cake\Auth namespace. You are required to move your providers and hashers to the App\Auth namespace as well.

You can find the plugin at https://github.com/cakephp/acl, but note that it's not yet stable.

这篇关于cakephp 3中的授权和ACL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆