Files
notifications-admin/app/models
Rebecca Law 039628cff7 Reorder the methods called in sign out
We found another scenario where signing out of the db can cause a 500.
If the user archives their trial mode service, current_service.active = false, then signs out, the current user was being signed out client side first, meaning current_user is now an Anonymous user, next the call to the API is made to log out user on db, all calls to NotifyApiClient `check_inactive_service`, which is only authorised if user is platform_admin, but an AnonymousUser does not have that attribute, so a 500 is raise.
Seemed a bit cleaner to change the User.signout method to rather than the `check_inactive_service` method for current_user.is_authenticated.
2020-02-05 15:58:15 +00:00
..
2020-01-16 16:31:20 +00:00
2020-01-16 16:31:20 +00:00
2020-02-04 15:36:55 +00:00
2020-01-16 16:31:20 +00:00
2020-02-05 15:58:15 +00:00