Skip to content

Commit 2e94858

Browse files
committed
Stop logging out platform admin users after 30 mins
This is purely to help when running user research sessions, and not a change we want to make in other environments.
1 parent 191285c commit 2e94858

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/notify_session.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from datetime import UTC, datetime, timedelta
1+
from datetime import UTC, datetime
22

33
from flask import Flask, Request, Response, request
44
from flask.sessions import SecureCookieSession, SecureCookieSessionInterface
@@ -17,10 +17,7 @@ def _get_inactive_session_expiry(self, app, session_start: datetime):
1717
"""
1818
absolute_expiration = session_start + app.permanent_session_lifetime
1919

20-
if current_user and current_user.platform_admin:
21-
refresh_duration = timedelta(seconds=app.config["PLATFORM_ADMIN_INACTIVE_SESSION_TIMEOUT"])
22-
else:
23-
refresh_duration = app.permanent_session_lifetime
20+
refresh_duration = app.permanent_session_lifetime
2421

2522
return min(datetime.now(UTC) + refresh_duration, absolute_expiration)
2623

0 commit comments

Comments
 (0)