mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
stop putting invite user objects in the session
the invited_user objects can be arbitrarily large, and when we put them in the session we risk going over the session cookie's 4kb size limit. since https://github.com/alphagov/notifications-admin/pull/3827 was merged, we store the user id in the session. Now that's been live for a day or two we can safely stop putting the rich object in the session. Needed to change a bunch of tests for this to make sure appropriate mocks were set. Also some tests were accidentally re-using fake_uuid. Still pop the object when cleaning up sessions. We'll need to remove that in a future PR.
This commit is contained in:
@@ -46,7 +46,6 @@ def accept_invite(token):
|
||||
return redirect(url_for('main.broadcast_tour', service_id=service.id, step_index=1))
|
||||
return redirect(url_for('main.service_dashboard', service_id=invited_user.service))
|
||||
|
||||
session['invited_user'] = invited_user.serialize()
|
||||
session['invited_user_id'] = invited_user.id
|
||||
|
||||
existing_user = User.from_email_address_or_none(invited_user.email_address)
|
||||
@@ -108,7 +107,6 @@ def accept_org_invite(token):
|
||||
session.pop('invited_org_user_id', None)
|
||||
return redirect(url_for('main.organisation_dashboard', org_id=invited_org_user.organisation))
|
||||
|
||||
session['invited_org_user'] = invited_org_user.serialize()
|
||||
session['invited_org_user_id'] = invited_org_user.id
|
||||
|
||||
existing_user = User.from_email_address_or_none(invited_org_user.email_address)
|
||||
|
||||
Reference in New Issue
Block a user