X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c819bec8b7b81fb2766a67247440375e4a837d10..bc10bc87586f43e1ec9ca542524f7b8798b29029:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 049f6e02e..68fc4338e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base before_action :fetch_body + attr_accessor :current_user helper_method :current_user def authorize_web @@ -49,7 +50,7 @@ class ApplicationController < ActionController::Base end def require_oauth - @oauth = @user.access_token(OAUTH_KEY) if current_user && defined? OAUTH_KEY + @oauth = current_user.access_token(OAUTH_KEY) if current_user && defined? OAUTH_KEY end ## @@ -468,16 +469,6 @@ class ApplicationController < ActionController::Base [user, pass] end - # used to get the current logged in user - def current_user - @user - end - - # used to set the current logged in user - def current_user=(user) - @user = user - end - # override to stop oauth plugin sending errors def invalid_oauth_response; end end