Module: Lockdown::Frameworks::Rails::Controller::Lock
- Defined in:
- lib/lockdown/frameworks/rails/controller.rb
Overview
Locking methods
Instance Method Summary collapse
- #check_request_authorization ⇒ Object
- #configure_lockdown ⇒ Object
-
#set_current_user ⇒ Object
Basic auth functionality needs to be reworked as Lockdown doesn’t provide authentication functionality.
Instance Method Details
#check_request_authorization ⇒ Object
21 22 23 24 25 26 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 21 def unless (path_from_hash(params)) parameters = respond_to?(:filter_parameters) ? filter_parameters(params) : params.dup raise SecurityError, "Authorization failed! \nparams: #{parameters.inspect}\nsession: #{session.inspect}" end end |
#configure_lockdown ⇒ Object
8 9 10 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 8 def configure_lockdown store_location end |
#set_current_user ⇒ Object
Basic auth functionality needs to be reworked as Lockdown doesn’t provide authentication functionality.
14 15 16 17 18 19 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 14 def set_current_user if logged_in? whodat = send(Lockdown::Configuration.who_did_it) Thread.current[:who_did_it] = whodat end end |