Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Control List to manage Database Column that are fetched

I have a site built in codeigniter for which I have designed an access control list to manage permissions of different types of users. Various users logged in to site are :

  1. Super Admin
  2. Admin
  3. SEO User
  4. Developer

Now I have completed the Access Control for this and permission for add, update, list and delete can be assigned to every user through a module accessible to Super Admin.

Now (this is a part of client's new requirement) I want to make the columns accessible to certain users, Eg:

If a table Products has 4 Columns

Products : 
id   |  Products | Price | Status
-----+-----------+-------+----------
1    |  prod1    | 20.0  |   1 
2    |  prod2    | 35.6  |   0

Now I want that for SEO Users Column Price does Not show up during the Listing.

NOTE : this is just an example, I need to make this dynamic so admin controls who has permission to which column. I cannot simply write If Else logic in my View File to exclude Unwanted columns.

Please Tell me how I can do this without redesign the whole system or making very major changes.

like image 758
Mohan Avatar asked Jan 15 '15 07:01

Mohan


1 Answers

You can use ion_auth library .. very simple to integrate and manage users and access levels ...

like image 153
George Avatar answered Oct 20 '22 20:10

George