如何使用CodeIgniter ACL库? [英] How can I use CodeIgniter ACL library?

查看:94
本文介绍了如何使用CodeIgniter ACL库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何实现ACL库?对用户角色使用ACL的最佳方法是什么?在标准PHP中,我会这样编写代码:

How can I implement an ACL library? What is the best way for using ACL for user roles? In standard PHP, I'd write code like this:

if (userTypeId == 'Admin') {
  hello Admin
} else if (userTypeId == 'Member') {
   hello member
}

如何使用CodeIgniter做到这一点?

How would you do this using CodeIgniter?

推荐答案

您可以开始使用Bonfire 用于带有Codeigniter的ACL。

You can start working with Bonfire for ACL with codeigniter.

这是一个易于使用的Codeigniter框架,具有一些其他功能。它包含用户注册,身份验证和基于角色的访问控制。...

It is a ready to use Codeigniter framework with some additional functionalities. It contains User registration, authentication, and Role-Base Access Control....

下载链接:

https://github.com/ci-bonfire/Bonfire/archive/master.zip

用于在篝火中使用用户权限和角色的文档:

Documentation for working with user permissions and roles in bonfire:

http://cibonfire.com/docs/bonfire/roles_and_permissions

这篇关于如何使用CodeIgniter ACL库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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