Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed anonymizer when 'full name required' setting is on #4087

Merged
merged 2 commits into from Mar 18, 2016

Conversation

jeremylan
Copy link
Contributor

When the setting 'full name required' is on the anonymizer was trying to set the user name to nil and this caused the user name and email to remain not anonymized.
Now in this scenario the user name is set to the anonymized username and the email is anonymized correctly.

When the setting 'full name required' is on the anonymizer was trying to set the user name to nil and this caused the user name and email to remain not anonymized.
Now in this scenario the user name is set to the anonimized username and the email is anonymized correctly.
@discoursebot
Copy link

You've signed the CLA, jeremylan. Thank you! This pull request is ready for review.

@ZogStriP
Copy link
Member

I like this, but could you add a test to ensure we don't regress here?

@jeremylan
Copy link
Contributor Author

Sure @ZogStriP, I'll do that. Do you have any links to commits with tests? That would help me as this is my first pull request!
Thanks

@ZogStriP
Copy link
Member

I don't have a link to commits with tests, but you can look at https://github.com/discourse/discourse/blob/master/spec/services/user_anonymizer_spec.rb. This might help get you started ;)

Also, don't hesitate to ask if you have any questions.

Added context and new test to check for correct user anonymizing depending on full_name_required Site Setting
@jeremylan
Copy link
Contributor Author

Thanks @ZogStriP, I've updated the test using context, hope it's ok.

@SamSaffron
Copy link
Member

thanks

SamSaffron added a commit that referenced this pull request Mar 18, 2016
Fixed anonymizer when 'full name required' setting is on
@SamSaffron SamSaffron merged commit 180888c into discourse:master Mar 18, 2016
@SamSaffron
Copy link
Member

also added this, c2fa314 cause tests were not covering this correctly

@jeremylan jeremylan deleted the bug_40489 branch March 18, 2016 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants