/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:
@@ -1,6 +1,5 @@
|
|||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
before_filter :member_only, :only => [:edit, :update]
|
|
||||||
skip_before_filter :api_check
|
skip_before_filter :api_check
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
|||||||
@@ -124,6 +124,15 @@ class UsersControllerTest < ActionController::TestCase
|
|||||||
assert_equal(20, @user.level)
|
assert_equal(20, @user.level)
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user