building Role based application

五迷三道 提交于 2019-11-29 15:00:52

问题


I have to make a small website

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.

Am using php and mysql database.

I don't want to go for CMS,Frameworks. It's a small application.


回答1:


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:

Stackoverflow

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

Other sites

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

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



来源:https://stackoverflow.com/questions/4374104/building-role-based-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!