建立基于角色的应用程序 [英] building Role based application

查看:72
本文介绍了建立基于角色的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须做一个小型网站

我有7种类型的用户.可以登录系统.

where I have 7 type of users. which can login into system.

一些用户有权添加设备,而其他用户则可以添加/编辑.其中一些只能查看.

some of users have permissions to only add equipments and others can add/edit. some of them can only view.

在系统中添加设备的所有用户都有一些公共字段,而某些字段是特定于用户的.

There will be some common fields for all users adding equipments in system and some fields will be user specific.

我必须随着用户更换设备来跟踪设备中的所有变化.

I have to track all changes in equipments with user changing equipments.

任何人都可以解释什么是完成这项工作的最佳方法.

Can any one explain what will be best way to do this job.

用户感知表结构的方式并跟踪设备的更改,用户跟踪登录以及用户所做的更改.

Way in the sense table structure for users and tracking changes in equipments and users tracking for both login and what changes done by them.

我正在使用php和mysql数据库.

Am using php and mysql database.

我不想去CMS,Frameworks.这是一个小应用程序.

I don't want to go for CMS,Frameworks. It's a small 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 worthwhile start.

但是,有很多关于如何创建一个的信息.这里有一些链接可以帮助您入门:

However, there's plenty of information out there on how to create one. Here's a few links to get you started:

堆栈溢出

基于角色的访问控制
对PHP页面的基于角色的访问 (无效链接)

Role Based Access Control
Role-based access to pages in PHP (dead link)

其他网站

基于角色的访问控制(RBAC)系统,用于PHP
基于精细角色的访问控制(RBAC)系统
模式教程系列(第1部分):RBAC域模型

A Role-Based Access Control (RBAC) system for PHP
Fine Grained Role Based Access Control (RBAC) system
Patterns Tutorial Series (part 1): RBAC Domain Model

搜索 PHP RBAC 无疑会发现更多的信息.

A search for PHP RBAC will no doubt reveal many more.

这篇关于建立基于角色的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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