mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 03:48:25 -04:00
fix deactivate
This commit is contained in:
@@ -147,7 +147,9 @@ def _do_login_dot_gov(): # $ pragma: no cover
|
|||||||
|
|
||||||
usr = User.from_email_address(user["email_address"])
|
usr = User.from_email_address(user["email_address"])
|
||||||
current_app.logger.info(f"activating user {usr.id} #notify-admin-1505")
|
current_app.logger.info(f"activating user {usr.id} #notify-admin-1505")
|
||||||
activate_user(usr.id)
|
# New users on the invite path need activation
|
||||||
|
if not usr.is_active:
|
||||||
|
activate_user(usr.id)
|
||||||
except BaseException as be: # noqa B036
|
except BaseException as be: # noqa B036
|
||||||
current_app.logger.error(f"Error signing in: {be} #notify-admin-1505 ")
|
current_app.logger.error(f"Error signing in: {be} #notify-admin-1505 ")
|
||||||
error(401)
|
error(401)
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ def _sign_out_at_login_dot_gov():
|
|||||||
def sign_out():
|
def sign_out():
|
||||||
|
|
||||||
if current_user.is_authenticated:
|
if current_user.is_authenticated:
|
||||||
current_user.deactivate()
|
|
||||||
session.clear()
|
session.clear()
|
||||||
current_user.sign_out()
|
current_user.sign_out()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user