]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Update Potlatch 2 to 2.3-236-ge27f26d build
[rails.git] / app / controllers / application_controller.rb
index 6caed05940a0bf024dbd51259f67fe04a68bbf92..0f9fad45e860ab40a6687b8eece4de1d59286cad 100644 (file)
@@ -51,7 +51,13 @@ class ApplicationController < ActionController::Base
   end
 
   def require_user
-    redirect_to :controller => 'user', :action => 'login', :referer => request.fullpath unless @user
+    unless @user
+      if request.get?
+        redirect_to :controller => 'user', :action => 'login', :referer => request.fullpath
+      else
+        render :nothing => true, :status => :forbidden
+      end
+    end
   end
 
   ##