E-Commerce Building
"In this case, you just keep a table that's storing wich user can have access to which form they can access and/or use. -edit: Or wich group of users can use certain forms."
thanks, thisi is interesting, but how would the structure of table be? I mean for forms that users can access?
Think of a modular design:
You have a module that's responsible for stocks, one that is for item- and product data, one that does the connection to ebay, one for amazon etc.
Each module consists of it's own data structures. Each module also has it's own frontend (a form or in your case: a webpage), or a page within the frontend to be precise.
So each module typically has a table that just stores its own permissions for a user or a role.
user (user_id, user_name)role (role_id, role_name)user_role (id, user_id, role_id)role_generalPermissions(rgp_role_id, rgp_canInvoice, ...)role_StockPermissions(rsp_role_id, rsp_canAccessStockPage, rsp_canModifyStockPage, rsp_canTransferStock, ...)
Another thing I have seen would be something like:
user (user_id, user_name)role (role_id, role_name)user_role (id, user_id, role_id)role_permissions (rp_role_id, rp_permissionName, rp_permissionValue)
Storing each thing they are allowed to do in a new row.
Like:
rp_role_id | rp_permissionName | rp_permissionValue1 CanAccessStuff true1 CanModifyStuff false2 CanAccessStuff true2 CanAccessStuff true

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now