On 29 Oct 2010, at 04:35, Jim Gay wrote: > On Sat, Oct 16, 2010 at 3:08 PM, swartz <[email protected]> wrote: >> I have a custom auth-system based on authlogic (based largely on >> reader extension). >> I have two roles: regular users and moderators. >> I also have two extra pages types, one is for moderators only, the >> other is for either. >> >> Whats would be recommended way to require certain user role to access >> a particular page type? >> Should I define a custom process() method for each page or is there a >> better way?
reader_group does something similar by overriding find_page and show_page in site_controller, but I looking at it now I probably should just have chained Page#find_by_url and defined some new exception types for the controller to catch. best, will
