为我的PHP应用程序实现ACL [英] Implementing ACL for my PHP application
问题描述
我的RealEstate PHP应用程序具有以下用户组,
My RealEstate PHP Application have following user groups,
管理员, 主持人 代理商
Admins, Moderators Agents
我想为以下用户指定以下权限.
i want to specify following permission to the following users.
管理员->
- 可以创建主持人
- 可以创建代理,
- 可以插入属性,
- 可以更新属性,
- 可以删除属性
因此,管理员将拥有所有特权,简而言之,这里的管理员将是超级管理员
Hence an Admin will have all the privileges in short an Admin here will be superAdmin
我想为主持人和代理分配有限的权限.
I want to assign limited privileges to the moderator and hence to the agents.
我对如何为此创建数据库以及如何在我的PHP应用程序中实现数据库感到困惑.
i am confused on how to Create a Database for this and also on how to implement it in my PHP Application.
谢谢
推荐答案
听起来您将需要基于角色的访问控制系统.发展不是 确实是一件微不足道的任务,因此正如已经建议的那样,找到一个框架或现成的类可以完成 这份工作将是值得的.
It sounds like you are going to need a role-based access control system. Developing one is not really a trivial task, so as already suggested, finding a framework or ready-made class that does the job would be a worth while start.
http://www.tonymarston.net/php -mysql/role-based-access-control.html
http://www.sqlrecipes.com/database_design/fine_grained_role_based_access_control_rbac_system-3/
http://www.sitepoint.com/forums/showthread.php ?threadid = 162027
您必须创建一个表,以定义所有类型的角色.
You should create a table wher you have to define all type of role.
为用户提供一张桌子
通过链接两个表将不同的角色与不同的用户相关联. 还有像这样的东西……
relate different roles to different user Via linking two tables. and some thing like this ......
这篇关于为我的PHP应用程序实现ACL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!