Module: Cornerstone::ControllerAdditions::ClassMethods

Defined in:
lib/cornerstone/controller_additions.rb

Instance Method Summary collapse

Instance Method Details

#authorize_cornerstone_admin!(*args) ⇒ Object

Returns true if user is authorized for controller action, otherwise raise error



13
14
15
16
17
# File 'lib/cornerstone/controller_additions.rb', line 13

def authorize_cornerstone_admin!(*args)
  self.before_filter(*args) do |controller|
    raise Cornerstone::AccessDenied unless cornerstone_admin?
  end
end