-2

I am making a site in which we have four types of users and admin have all privileges.

1) Admin

2) Client

3) Co-Admin

4) Developer

Can u suggest how do I make database in order to decide different privillage as per user types.

aneroid
  • 12,983
  • 3
  • 36
  • 66
Daksh
  • 33
  • 7
  • 1
    What are you programming the *site* in? If you use an existing framework to build the site, many have solved this problem for you already. – Joachim Isaksson Sep 07 '12 at 05:50
  • i am making this in code igniter .... this is my first project in CI ... can u help me put – Daksh Sep 07 '12 at 05:51
  • what field i had to cover in database to solve this issue of privillages .. – Daksh Sep 07 '12 at 05:55
  • 1
    possible duplicate of [CodeIgniter -- Best implementation for ACL](http://stackoverflow.com/questions/5556293/codeigniter-best-implementation-for-acl) – Joachim Isaksson Sep 07 '12 at 05:55

2 Answers2

1

Have a table of roles (id, role_name) and a many-many bridge table (user_id, role_id).

Then use the standard techniques for implementing a many-to-many relationship between them.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

Yeah i hope this instructions could help you ,correct me if 'm wrong

1.Maintain a table User Roles for example {1 Admin , 2 Client,3 Developer},

2.Maintain a table Accessibility for example {1 Read,2 Write}

3.Maintain a individual table Role_Access for example {User_id1,Access_id}

thar45
  • 3,518
  • 4
  • 31
  • 48
  • @ Vaibhav Agarwal ...What else you are expecting ? Create the database and design the table with the required fields. – thar45 Sep 07 '12 at 06:07
  • actually admin see all functionality an modify any field ..... and client only update the consern field and so developer .... I not able to decide how we fix this and how ? – Daksh Sep 07 '12 at 06:15
  • Create a separate access policies for pages/fields and assign needed policies to the users and admin – thar45 Sep 07 '12 at 06:26
  • WC to SO ...If found the answer is helpful to you work in the accept rate – thar45 Sep 07 '12 at 07:07