[Cluster-devel] conga/luci plone-custom/manage_inactive.js sit ...
rmccabe at sourceware.org
rmccabe at sourceware.org
Mon Mar 24 23:22:12 UTC 2008
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2008-03-24 23:22:11
Modified files:
luci/plone-custom: manage_inactive.js
luci/site/luci/Extensions: LuciZope.py LuciZopeAsync.py
luci/site/luci/var: Data.fs
Log message:
Forward port fixes from RHEL5
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/manage_inactive.js.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZope.py.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciZopeAsync.py.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/var/Data.fs.diff?cvsroot=cluster&r1=1.31&r2=1.32
--- conga/luci/plone-custom/manage_inactive.js 2008/02/08 21:47:56 1.1
+++ conga/luci/plone-custom/manage_inactive.js 2008/03/24 23:22:09 1.2
@@ -78,7 +78,7 @@
return (initiate_async_get(check_inactive_url, check_inactive_callback));
}
-setInterval("update_last_active()", 1000 * 30);
+setInterval("update_last_active()", 100 * 275);
setInterval("check_user_inactive()", 1000 * 60);
window.onmousemove = new Function('activity_event_handler()');
window.onkeypress = new Function('activity_event_handler()');
--- conga/luci/site/luci/Extensions/LuciZope.py 2008/03/05 23:08:58 1.10
+++ conga/luci/site/luci/Extensions/LuciZope.py 2008/03/24 23:22:09 1.11
@@ -8,7 +8,7 @@
from LuciZopePerm import userAuthenticated
from LuciDB import allowed_systems
from LuciSyslog import get_logger
-from conga_constants import LUCI_DEBUG_MODE
+from conga_constants import LUCI_DEBUG_MODE, INACTIVITY_TIMEOUT_SEC
luci_log = get_logger()
@@ -184,10 +184,10 @@
from time import time
if userAuthenticated(self):
request.SESSION.set('last_activity', int(time()))
+ request.SESSION.setTimeoutMinutes(max(INACTIVITY_TIMEOUT_SEC / 60, 10))
def user_check_inactive(self, request):
from time import time
- from conga_constants import INACTIVITY_TIMEOUT_SEC as INACTIVITY_TIMEOUT
if not userAuthenticated(self):
return (False, -1)
@@ -196,11 +196,12 @@
old_time = request.SESSION.get('last_activity', None)
if old_time is None:
request.SESSION.set('last_activity', cur_time)
+ request.SESSION.setTimeoutMinutes(max(INACTIVITY_TIMEOUT_SEC / 60, 10))
return (False, -2)
old_time = int(old_time)
time_diff = cur_time - old_time
- if time_diff >= INACTIVITY_TIMEOUT:
+ if time_diff >= INACTIVITY_TIMEOUT_SEC:
return (True, time_diff)
return (False, time_diff)
--- conga/luci/site/luci/Extensions/LuciZopeAsync.py 2008/02/27 20:09:19 1.9
+++ conga/luci/site/luci/Extensions/LuciZopeAsync.py 2008/03/24 23:22:09 1.10
@@ -172,8 +172,9 @@
def check_inactive_async(self, request):
from LuciZope import user_check_inactive
+ from conga_constants import INACTIVITY_TIMEOUT_SEC
(inactive, diff) = user_check_inactive(self, request)
- xml_obj = result_to_xml((True, { 'inactive': inactive, 'diff': diff }))
+ xml_obj = result_to_xml((True, { 'inactive': inactive, 'diff': diff, 'max_inactive': INACTIVITY_TIMEOUT_SEC }))
write_xml_resp(request, xml_obj)
def update_inactive_async(self, request):
Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs 2008/02/08 21:47:56 1.31 and /cvs/cluster/conga/luci/site/luci/var/Data.fs 2008/03/24 23:22:09 1.32 differ
rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed
More information about the Cluster-devel
mailing list