aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index ae953a25a..8cde89db0 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,4 +1,15 @@
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :authenticate_user!
+
+ protected
+
+ def current_organisation
+ current_user.organisation if current_user
+ end
+ helper_method :current_organisation
+
+ def begin_of_association_chain
+ current_organisation
+ end
end