5

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.

  • 2
    i suggest you start looking at a framework be it either Zend , CackePHP , Codeigniter ... it will be easyer to get the app started and most of them allready have implementation for an ACL role system – Poelinca Dorin Dec 07 '10 at 07:13
  • 1
    possible duplicate of [Question regarding PHP possibilites (users, admin/mod)](http://stackoverflow.com/questions/4369650/question-regarding-php-possibilites-users-admin-mod) – Ignacio Vazquez-Abrams Dec 07 '10 at 07:18
  • 2
    @pradeep : Don't comment if u can't understand question. –  Dec 07 '10 at 07:19
  • 1
    Ya agree with poelinca when these things are already available by experts then why people still want to start it on own from scratch. In fact they save alot of time and provide a better way to handle possible conditions – Shakti Singh Dec 07 '10 at 07:28
  • 1
    It's a small application.I don't want to go towards CMS,Frameworks. –  Dec 07 '10 at 07:52

1 Answers1

4

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.

mickmackusa
  • 43,625
  • 12
  • 83
  • 136
Mike
  • 21,301
  • 2
  • 42
  • 65