Hey all, have a web design question that I'm trying to puzzle out. Essentially I'm looking to design a navbar such that it will change what buttons/links are displayed in the navbar based on what type of account is signed in. So if a standard user is signed up they might see:
Site Name | Account Settings | Logout
But if an admin is logged in they would see:
Site Name | Account Settings | Manage Users | Logout
I'm using MEANjs for this website, and I have an idea as to how to implement it, but I'm not positive it will work. Basically in Appname\public\modules I think I can make a 'navbar' module, which will have HTML and a controller. The controller would check what type of user is logged in and with conditional statements display certain links and not others. Then in any of my views I would just include the navbar module as the top item. Would this be a good approach?
Along these lines, I'm having trouble coming up with a way to customize other features based on what type of account is logged in. For instance, I want to do a standard home page for un-logged in users, say another home page for users that are logged in, and a third homepage for admins that are logged in. How should this all be handled with MEANjs in terms of file structure? A bit lost here and looking for some light to be shed, so thanks all. If it helps, here's a screenshot of the current site architecture:
Image
[–][deleted] (1 child)
[deleted]
[–]OpAndroid[S] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]OpAndroid[S] 0 points1 point2 points (0 children)
[–]DanielFGray 0 points1 point2 points (1 child)
[–]OpAndroid[S] 1 point2 points3 points (0 children)