Best approach for a system with different user types

Hello!

I have to work in a system that have 8 kinds of user types.
Some of them will use the same functionalities and some not.
So I was thinking, what is the best way to make it?

1 - Create a different url for each user type.
So the pages will be unique for every type, and then will only load the components and widgets for that type.
The problem on this is, when I have to fix something on a given component i will have to make it again for every user type.

2 - Use the same pages for every user type.
In this approach I would use the same pages, but the widgets and components would be shown or hidden accordingly to the user type. But lets say i have 8 versions of the same page, i would use a state variable to show only the state for that user type, but wouldn't all components load on background regardless of whether I show it or not? If so, i think i would have performance problems.

So what would be the best way to do it? Any of these 2, or another way?

Thanks.

1
2 replies