permissions - How to give access rights for pages and menus in php? -


i'm working on website there 3 types of users: admin, managers, , operators. want give access these groups them able view pages or menus in these pages when login. how go doing this? im still beginner in php information or tutorials implement helpful.

this loaded question, in experience want make 3 tables. highlight basic columns make work

user user_id, login, password

access access_id, access_code, access_name

useraccess user_access_id, access_id

then create accesses want administrator give access code admin_rights, manager access code manager_rights, , on.

then assign users access want give them. pages assign access_codes can view page , if user has access type can view page. far code goes there lot show if need more help,let me know.

you go further , add role table allows assign multiple accesses , assign role user.

role role_id, role_name

roleaccess role_access_id, role_id, access_id

userrole user_role_id, role_id, user_id

it gets complex, in long run allows set many different user types , allows specific special users want have access , , don't fit predefined role.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -