I have implementation of a collection of items (model, collection, view for the collection, view and template file for individual item). In addition to that I have some session variables (for example user credentials/session properties/permissions). I'd like to show different fields and options for each item depending on the user permissions (normal users can just view them, admins can edit/delete etc). What is the cleanest way of doing that? Any way of passing session through through view constructors or adding a reference to the session structure to each model doesn't seem right. It's sounds like what I want is to have these session structure global and want to have access to it from within the template of my view, but I doubt thats the right approach.
Thanks