为我的 PHP 应用程序实现 ACL

编程入门 行业动态 更新时间:2024-10-27 10:19:21
本文介绍了为我的 PHP 应用程序实现 ACL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的 RealEstate PHP 应用程序有以下用户组,

My RealEstate PHP Application have following user groups,

管理员,版主代理

我想为以下用户指定以下权限.

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.

基于角色的访问控制

www.tonymarston/php-mysql/role-based-access-control.html

www.sqlrecipes/database_design/fine_grained_role_based_access_control_rbac_system-3/

www.sqlrecipes/database_design/fine_grained_role_based_access_control_rbac_system-3/

www.sitepoint/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

本文发布于:2023-11-12 03:27:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580377.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   PHP   ACL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!