diff options
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 07805e7..00318d7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -25,6 +25,8 @@ class ApplicationController < ActionController::Base before_filter :public_and_logged_in before_filter :require_current_eula + after_filter :mark_login_status + layout :pick_layout_based_on_site rescue_from ActiveRecord::RecordNotFound, :with => :render_not_found @@ -168,6 +170,12 @@ class ApplicationController < ActionController::Base login_required unless GitoriousConfig['public_mode'] end + def mark_login_status + if logged_in? + headers['X-Logged-In'] = "true" + end + end + # turns ["foo", "bar"] route globbing parameters into "foo/bar" def desplat_path(*paths) paths.flatten.compact.map{|p| CGI.unescape(p) }.join("/") |