Let's say our application has three main categories of views (items of type 1, items of type 2...). And we have three (or more in future) types of users - Admins, let's say Moderators and typical Users. And in the future there might be more of them. Admins have full access to app, Moderators can visit only 2/3 type of items, and Users can visit only basic type of items.

Should I divide my controllers/views/whatever like this:

Items "A", Items "B", Items "C", then make them 100% finished and at the end add access privileges?

1 Answer
1

The model is an interface defining the data to be displayed or otherwise acted upon in the user interface.

User privilege level is just a parameter - as any other parameter. That means that your models should dictate what is allowed depending on that parameter. There are no needs to do additional complication (divide application as you suggested).