This commit fixes the case where invited users who typed in a password would not be approved by default. Because we moved the user create logic for an invited user there was a clash with the `save` in the user model and the `save` in the invite_redeemer class. - added approve logic into invite_redeemer class. - added tests to verify that the user is approved - added a check to see if must_approve_users is on - added a check to see if the inviter is staff - go ahead and approve the user if must_approve_users is off - keep existing User.approve workflow if user exists - improve if/else logic to remove duplicate code - use `Time.zone.now` |
||
|---|---|---|
| .. | ||
| components | ||
| controllers | ||
| fabricators | ||
| fixtures | ||
| helpers | ||
| integration | ||
| integrity | ||
| jobs | ||
| mailers | ||
| models | ||
| phantom_js | ||
| serializers | ||
| services | ||
| support | ||
| tasks | ||
| views/omniauth_callbacks | ||
| discourse_tagging_spec.rb | ||
| rails_helper.rb | ||