X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c8f9387420233bd7e845cb205c3b68ede1f90024..7c1b6e850d4a177776aaaabcd8b2343790024004:/app/controllers/application.rb?ds=sidebyside diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 82ef80920..366646ae3 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -2,10 +2,10 @@ # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base + def authorize_web + @user = User.find_by_token(session[:token]) + end - - # HTTP AUTH stuff for the API - def authorize(realm='Web Password', errormessage="Could't authenticate you") username, passwd = get_auth_data # check if authorized