Method: Cms::Acts::ContentPage#check_access_to_section

Defined in:
lib/cms/acts/content_page.rb

#check_access_to_sectionObject

Before filter that determines if the current user can access a specific section.



50
51
52
53
54
55
56
57
# File 'lib/cms/acts/content_page.rb', line 50

def check_access_to_section
  user = current_user
  logger.warn "Checking that current_user '#{user.login}' has access to view section with path '#{self.class.in_section}'."
  unless user.able_to_view?(self.class.in_section)
    store_location
    raise Cms::Errors::AccessDenied
  end
end