Avatar of Crazy Horse
Crazy Horse
Flag for South Africa asked on

Looking for suggestions on different user roles best design practices

I am going to have about 3 or 4 different access levels and some content should be available to some users and some not. I am looking for some advice on how best to do this.

For example, I thought of when a user logs in, they are presented with different navigation panels depending on their level of access. So, there could be a switch statement which would then include different navs like:

nav-management.php
nav-operator.php
nav-admin.php

etc.

Or, is it common practice to show one navigation for all users but when a user clicks on a certain item a check is done on their access level and if not authorised, a message can popup stating they they aren't authorized to access that.

I have a similar question around the dashboard. I could use the switch statement again and display different dashboards depending on the access level of the user or code each widget on the dashboard to only display for certain access levels.

I am not sure if there is a right or wrong way of doing this but any advice would be appreciated.
PHP

Avatar of undefined
Last Comment
Crazy Horse

8/22/2022 - Mon
SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Julian Hansen

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Crazy Horse

ASKER
Thank you both for your answers. I would like to award both as best answers but we know this isn't possible ( I did request it). So, I don't know how to choose a "best solution". Perhaps I will just have to take turns. I will see if I can find who I awarded best answer last time I had this problem and then just do the opposite this time.
Crazy Horse

ASKER
After a quick look it seems like I awarded Ray with best answer for my MVC question. So, this time can be Julian and next time in this situation, Ray again :)
Your help has saved me hundreds of hours of internet surfing.
fblack61