water has asked for the wisdom of the Perl Monks concerning the following question:
Playing with Catalyst, using Mason for the view.
Working on access control: certain pages can only be accessed by users in certain roles.
My question: where to store the roles for a given page?
One method is to have the controller for each page check, storing the valid roles for each page there in the corresponding method.
A different way (perhaps) which seems more natural to me would be to store the list of eligble roles for each page on the template for that page itself.
What do folks think about this design?
And how can a list defined on a mason template be accessed by the app (eg a catalyst method) that populates said template?
Thanks for advice suggestions etc!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Passing Data Back From Mason template
by Joost (Canon) on Jun 02, 2006 at 02:07 UTC | |
by water (Deacon) on Jun 04, 2006 at 00:29 UTC | |
by Joost (Canon) on Jun 04, 2006 at 23:46 UTC |