/users: allow banned users to edit account settings.

The member_only check prevents banned users from editing their account
settings. This isn't needed since check_privilege handles the privilege check.
This commit is contained in:
evazion
2017-07-06 18:21:58 -05:00
parent cc54c16fac
commit cda1ee3d88
2 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,5 @@
class UsersController < ApplicationController
respond_to :html, :xml, :json
before_filter :member_only, :only => [:edit, :update]
skip_before_filter :api_check
def new

View File

@@ -124,6 +124,15 @@ class UsersControllerTest < ActionController::TestCase
assert_equal(20, @user.level)
end
end
context "for a banned user" do
should "allow the user to edit their settings" do
@user = FactoryGirl.create(:banned_user)
post :update, {:id => @user.id, :user => {:favorite_tags => "xyz"}}, {:user_id => @user.id}
assert_equal("xyz", @user.reload.favorite_tags)
end
end
end
end
end