diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c2414f5bb..2bdf8078a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -15,6 +15,10 @@ class ApplicationController < ActionController::Base I18n.locale = session[:language] || I18n.default_locale end + def pundit_user + UserContext.new(current_user, referential: self.try(:current_referential)) + end + protected def user_not_authorized |
