mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: users with no posts shouldn't able to edit username after the allowed period. (#17583)
We are no longer going to let users change their username after the allowed `username_change_period` when there are no posts created by the user.
This commit is contained in:
@@ -2789,8 +2789,8 @@ describe Guardian do
|
||||
|
||||
context 'with no posts' do
|
||||
include_examples "staff can always change usernames"
|
||||
it "is true for the user to change their own username" do
|
||||
expect(Guardian.new(target_user).can_edit_username?(target_user)).to be_truthy
|
||||
it "is false for the user to change their own username" do
|
||||
expect(Guardian.new(target_user).can_edit_username?(target_user)).to be_falsey
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user