如何实现 ACL 库?对用户角色使用 ACL 的最佳方法是什么?在标准 PHP 中,我会编写如下代码:
if (userTypeId == 'Admin') {
hello Admin
} else if (userTypeId == 'Member') {
hello member
}
您将如何使用 CodeIgniter 来做到这一点?
您可以开始使用Bonfire http://cibonfire.com/用于带有 codeigniter 的 ACL。
它是一个随时可用的 Codeigniter 框架,具有一些附加功能。它包含用户注册、身份验证和基于角色的访问控制......
下载链接:
https://github.com/ci-bonfire/Bonfire/archive/master.zip https://github.com/ci-bonfire/Bonfire/archive/master.zip
在 bonfire 中使用用户权限和角色的文档:
http://cibonfire.com/docs/bonfire/roles_and_permissions http://cibonfire.com/docs/bonfire/roles_and_permissions
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)