So im doing a project with a company and i am making a website using jade/html,
ID: 3686172 • Letter: S
Question
So im doing a project with a company and i am making a website using jade/html, css and javascript. We are using mongodb for our database. This database will contain a list of employees with certain coding skills. The problem is that they want basically three layers of permissions and im not sure how to do that. They want the "admin" to be able to basically do anything/edit/view whatever they want. They want the "manager" to be able to edit/view their "teams" information. By "teams" i mean this company has three seperate departments. Like mapping, data analysis, and whatever else. And then they want a "regular" user to just be able to view his information. Im not sure where i would implement this. Do i implement it in the jade/html or the javascript? Any guidance would be appreciated.
Explanation / Answer
I hope you should have roles ,users and user role mapping at database.
Admin
Manager
Application should have activity/flows based on roles, as each user much tag to a role/roles.
Based on roles/activities provide the accessibility to user to perform their user activities.
You can implement the logic in javascript based on the roles to navigate and perform respective activities.
Example: For admin role can navigate and perform the activities like do anything/edit/view
For manager read only and write only for their teams
For users we will give read only to his profile.
Is this information helpful or you need any further information
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.