Hello all. I have a FW/1 website with subsystem for salespeople. It has various sections such as sales, contacts, earnings, etc. All sections of the salesperson subsystem share a common layout that displays the salesperson header (salesperson's name, location, title and links to sections they can access). In order to display the subsection layout, I have to perform some logic in order to determine what sections the current user can access and then save rc variables used by the layout to display the salesperson header. My question is, where do I put the code for that logic?
My first thought would be to put the code in the controller. But there's no 'default controller' for all sections of a subsystem. I would have to put the same lines of code in EACH controller for each section of the subsystem (sales, contacts, earnings, etc). That would seem to violate the D.R.Y. principle.
My second thought was placing the code in the subsection's default layout since the code would only appear once, but that would seem to violate MVC rules of where logic should go.
Where is the best place to put that code?