I am working in angular 6, node.js and MongoDB.I need some logical explanation to this => The menu list for my application is in a database with a role field in it, where the user with that role alone can see while login. I have User and MenuList documents. In user i have user details and their roles. In menu list, I have a menu and the role in it. My doubt is that I will explain with an example. If a user(A) with role(Admin) login. I get to show only the menu list where the menus role = Admin.
Asked
Active
Viewed 211 times
0
-
Is there any api which provides you to role wise menulist? – Zarna Borda Mar 15 '19 at 06:23
-
No. I need some explanation how can I do it a node or MongoDB @ZarnaBorda – Viveka Mar 15 '19 at 06:29
1 Answers
0
While login stores the user detail in storage. and For menu list Call the API which provides you to menu list according to the role and from API response you can create a menu according to the user's role. Take user role from storage.

Zarna Borda
- 695
- 1
- 6
- 22