lib/site_controller_extensions.rb in radiant-reader-extension-2.0.0.rc4 vs lib/site_controller_extensions.rb in radiant-reader-extension-3.0.0.rc3
- old
+ new
@@ -5,16 +5,16 @@
# NB. to control access without disabling the cache we have overridden Page.cache?
# to return false for any page that has a group association.
def find_page_with_group_check(url)
page = find_page_without_group_check(url)
- raise ReaderGroup::PermissionDenied if page && !page.visible_to?(current_reader)
+ raise ReaderError::AccessDenied if page && !page.visible_to?(current_reader)
page
end
def show_page_with_group_check
show_page_without_group_check
- rescue ReaderGroup::PermissionDenied
+ rescue ReaderError::AccessDenied
if current_reader
flash[:error] = t("reader_extension.access_denied")
redirect_to reader_permission_denied_url
else
flash[:explanation] = t("reader_extension.page_not_public")