[Rails] Design question - integrating light-weight authorization
Chris Brooks
brookscl at gmail.com
Wed Nov 24 07:43:43 GMT 2004
This might be more of an MVC design pattern question than a
Rails-specific question, but I'm sure someone out there will be
willing to help out.
I have a number of pages that should render differently based on the
authentication state of the user (much of the content can be viewed
even if unauthenticated) and the role of the user. Usually this means
that certain edit fields / buttons won't be displayed if the user
doesn't have privs to do so.
I'm struggling with the right way to represent this. Should I be
using a single view for these pages with conditional hiding of certain
portions of the rendered page? Or should I be using different views
for each class of user, with appropriate render calls from the
controller?
Thanks,
--
Chris Brooks
http://www.chrisbrooks.org
More information about the Rails
mailing list