mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 05:08:24 -04:00
remove invited_user from session entirely
now that we no longer set it since https://github.com/alphagov/notifications-admin/pull/3841 was merged, we don't need to remove it either. And we can remove checks that expect it when cleaning up the session. And the unit tests that make sure we ignore it if it's in the session. So long, session['invited_user'] and session['invited_org_user']!
This commit is contained in:
@@ -39,7 +39,6 @@ def accept_invite(token):
|
||||
service_name=service.name)
|
||||
|
||||
if invited_user.status == 'accepted':
|
||||
session.pop('invited_user', None)
|
||||
session.pop('invited_user_id', None)
|
||||
service = Service.from_id(invited_user.service)
|
||||
if service.has_permission('broadcast'):
|
||||
@@ -103,7 +102,6 @@ def accept_org_invite(token):
|
||||
organisation_name=organisation.name)
|
||||
|
||||
if invited_org_user.status == 'accepted':
|
||||
session.pop('invited_org_user', None)
|
||||
session.pop('invited_org_user_id', None)
|
||||
return redirect(url_for('main.organisation_dashboard', org_id=invited_org_user.organisation))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user