Question

Not sure if I'm going about this the "right" way.

In my application, I have recently had the requirement added for a second "type" of user. This means realistically I will need to route this user to a different controller than the primary type.

As a more concrete example:

The primary user of the application will be staff members. They will need to see company wide information.

Now, clients of the company will need to be able to log into the application, and see information specific to their needs (and no more).

Furthermore, there are likely to be more types of user in the future.

What is the "correct" way of designing/implementing this?

Was it helpful?

Solution

I think that, if you control the users role in the TWIG templates and showing them the only links that they could access (and, of course, protecting the routes with firewalls in the security.yml) may work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top