Blake Erickson dbb3ddc7a6 FIX: approve invited user
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`
2017-03-05 06:58:23 -07:00
..
2017-02-15 00:05:58 -08:00
2016-09-29 13:42:56 +08:00
2016-12-22 16:46:53 +11:00
2016-12-22 16:46:53 +11:00
2017-02-03 08:38:19 +08:00
2016-12-12 17:29:54 +08:00
2017-03-05 06:58:23 -07:00
2016-12-22 16:46:53 +11:00
2016-12-22 16:46:53 +11:00
2016-12-22 16:46:53 +11:00
2016-12-22 16:46:53 +11:00
2016-12-22 16:46:53 +11:00
2016-10-28 16:14:20 -04:00
2016-12-22 16:46:53 +11:00
2017-03-02 13:53:45 +02:00
2016-09-05 18:44:00 +08:00
2016-09-05 18:44:00 +08:00