mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-01 06:30:56 -04:00
Add initial file for popup
This commit is contained in:
@@ -349,7 +349,7 @@ def make_session_permanent():
|
||||
"""
|
||||
Make sessions permanent. By permanent, we mean "admin app sets when it expires". Normally the cookie would expire
|
||||
whenever you close the browser. With this, the session expiry is set in `config['PERMANENT_SESSION_LIFETIME']`
|
||||
(20 hours) and is refreshed after every request. IE: you will be logged out after twenty hours of inactivity.
|
||||
(30 min) and is refreshed after every request. IE: you will be logged out after thirty minutes of inactivity.
|
||||
|
||||
We don't _need_ to set this every request (it's saved within the cookie itself under the `_permanent` flag), only
|
||||
when you first log in/sign up/get invited/etc, but we do it just to be safe. For more reading, check here:
|
||||
|
||||
15
app/assets/javascripts/timeoutPopup.js
Normal file
15
app/assets/javascripts/timeoutPopup.js
Normal file
@@ -0,0 +1,15 @@
|
||||
(function(global ) {
|
||||
"use strict";
|
||||
|
||||
var cookie = window.GOVUK.getCookie('notify_admin_session');
|
||||
|
||||
if (cookie) {
|
||||
window.alert("Session will expire: Cookie Value" + cookie);
|
||||
} else {
|
||||
window.alert('Session has expired');
|
||||
}
|
||||
console.log(cookie);
|
||||
|
||||
|
||||
})(window);
|
||||
|
||||
@@ -50,7 +50,7 @@ class Config(object):
|
||||
EMAIL_EXPIRY_SECONDS = 3600 # 1 hour
|
||||
INVITATION_EXPIRY_SECONDS = 3600 * 24 * 2 # 2 days - also set on api
|
||||
EMAIL_2FA_EXPIRY_SECONDS = 1800 # 30 Minutes
|
||||
PERMANENT_SESSION_LIFETIME = 20 * 60 * 60 # 20 hours
|
||||
PERMANENT_SESSION_LIFETIME = 1800 # 30 Minutes
|
||||
SEND_FILE_MAX_AGE_DEFAULT = 365 * 24 * 60 * 60 # 1 year
|
||||
REPLY_TO_EMAIL_ADDRESS_VALIDATION_TIMEOUT = 45
|
||||
ACTIVITY_STATS_LIMIT_DAYS = 7
|
||||
|
||||
Reference in New Issue
Block a user