0

I am developing a website with user authentication. I need to implement settings for each users. I found a solution. But I need more better solution.

My solution is given below.

I have 2 tables, UserTable and SettingsTable. I created a new table UserSettings for relating the UserTable and SettingsTable as shown below

user settings schema

But there is several type of users Like super_admin, managers, supervisors and normal_users. They are in a top down manner.

There are privileges.

  • Super_admin can give privileges to others
  • Managers can give privileges to supervisors and noraml_users
  • supervisors can give privileges to normal_users.

Please help me to find a better solution.

Sajith
  • 2,842
  • 9
  • 37
  • 49
  • Are those "settigns" used ONLY for users ? if so, I do not really see the need for 3 separate tables ... – Obmerk Kronen Aug 27 '13 at 05:24
  • What is it you don't like about this solution (what would be "better")? – Alain Collins Aug 27 '13 at 05:39
  • There is a super_user who can give permissions to other users to edit their settings or can set default value for each settings. In this situation how to modify the above schema? – Sajith Aug 27 '13 at 06:02