Skip to content

Commit

Permalink
specify rescue_froms in site controller too
Browse files Browse the repository at this point in the history
  • Loading branch information
will-r committed Oct 12, 2011
1 parent e587c40 commit c11d040
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/controller_extensions.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module ControllerExtensions # for inclusion into ApplicationController

def self.included(base)

base.class_eval do
rescue_from ReaderError::AccessDenied, :with => :access_denied
rescue_from ReaderError::LoginRequired, :with => :login_required
Expand Down
2 changes: 1 addition & 1 deletion lib/radiant-reader-extension.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module RadiantReaderExtension
VERSION = '3.0.18'
VERSION = '3.0.19'
SUMMARY = %q{Reader/viewer/visitor registration, login and access-control for Radiant CMS}
DESCRIPTION = %q{Provides reader/member/user registration and management functions including password-reminder, group-based page access control and administrative email.}
URL = "http://radiant.spanner.org/reader"
Expand Down
4 changes: 4 additions & 0 deletions lib/site_controller_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ module SiteControllerExtensions

def self.included(base)
base.class_eval {
rescue_from ReaderError::AccessDenied, :with => :access_denied
rescue_from ReaderError::LoginRequired, :with => :login_required
rescue_from ReaderError::ActivationRequired, :with => :activation_required

# NB. to control access without disabling the cache we have overridden Page.cache?
# to return false for any page that has a group association.

Expand Down

0 comments on commit c11d040

Please sign in to comment.