]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/oauth_controller.rb
Change direction string ids to force retranslation
[rails.git] / app / controllers / oauth_controller.rb
index 819f74dc1f9cefb9691aa2efcd11f0172c5a588f..8ce53739fdff427bd656f9b9aba7b7c90aec273c 100644 (file)
@@ -1,9 +1,9 @@
-require 'oauth/controllers/provider_controller'
+require "oauth/controllers/provider_controller"
 
 class OauthController < ApplicationController
   include OAuth::Controllers::ProviderController
 
-  layout 'site'
+  layout "site"
 
   def login_required
     authorize_web
@@ -30,7 +30,7 @@ class OauthController < ApplicationController
     @token = current_user.oauth_tokens.find_by_token params[:token]
     if @token
       @token.invalidate!
-      flash[:notice] = t('oauth.revoke.flash', :application => @token.client_application.name)
+      flash[:notice] = t("oauth.revoke.flash", :application => @token.client_application.name)
     end
     redirect_to oauth_clients_url(:display_name => @token.user.display_name)
   end
@@ -38,11 +38,6 @@ class OauthController < ApplicationController
   protected
 
   def oauth1_authorize
-    unless @token
-      render :action => "authorize_failure"
-      return
-    end
-
     if @token.invalidated?
       @message = t "oauth.oauthorize_failure.invalid"
       render :action => "authorize_failure"