]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_roles_controller.rb
Fix various routing and route generation errors
[rails.git] / app / controllers / user_roles_controller.rb
index 2d867d2d830ded02365bad71b5df5194b1b82832..54dc90dee911e7f62d9a36d48f0250380c4f0673 100644 (file)
@@ -11,7 +11,9 @@ class UserRolesController < ApplicationController
   around_filter :setup_nonce
 
   def grant
-    @this_user.roles.create(:role => @role, :granter_id => @user.id)
+    @this_user.roles.create({
+      :role => @role, :granter_id => @user.id
+    }, :without_protection => true)
     redirect_to :controller => 'user', :action => 'view', :display_name => @this_user.display_name
   end