Jump to content

Permission system


Liquid Fire

Recommended Posts

I am just wondering how people think permission system should be.  I can think of 2 major type that i have seen.

 

The first which is the way i prefer because it seems quite flexible is have some sort of identifier and the a permission type.  for instance i have a management system that have permission setup based on system and module.  a system could be "CMS" and a module for that system could be news.  Now the permissions would be something like "edit, view, delete, etc..." and this way i can give a user the permission to view/edit news but not delete by giving them a record in the user_permissions table with cms, news, view with status of "active" and another record with cms, news, view with status of "active".  to take away a permission i would just set the user permission record to inactive.  the down side to this is there are more record per system/module combo.

 

The other way is to use bit-wize operators and just a level like 4, 16, 32, etc...  The reason i don't like that is it is a bit more complex to understand and hard to see what permissions a user has just by looking at the database.

 

Which way do you prefer or maybe there is a different method i have not mentioned that you like?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.