summaryrefslogtreecommitdiff
path: root/app/controllers/sessions_controller.rb
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-07-17 12:16:07 +0200
committerazul <azul@leap.se>2014-07-17 12:16:07 +0200
commitade74d8a9091ae607586d7b287a0579a2ee7af8e (patch)
tree74273b8ba7e35d0fb3c96aa79e63c93086d15146 /app/controllers/sessions_controller.rb
parent952bc18e8333ca5c3e6e16f8059f84a1414d5f6f (diff)
parente86cccb4b89540f3bd403110d051b2723be781b9 (diff)
Merge pull request #176 from azul/feature/api-authenticated-configs
API: Authenticated access to config settings
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r--app/controllers/sessions_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index 8919a4d..66eba40 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -16,6 +16,13 @@ class SessionsController < ApplicationController
end
#
+ # Warden will catch all 401s and run this instead:
+ #
+ def unauthenticated
+ login_required
+ end
+
+ #
# this is a bad hack, but user_url(user) is not available
# also, this doesn't work because the redirect happens as a PUT. no idea why.
#