Commit 3ca0154f authored by Christophe Dumez's avatar Christophe Dumez

- code clean up

- increased cookie life to 7 days


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6552 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c1703a34
...@@ -42,7 +42,6 @@ from zExceptions import Unauthorized ...@@ -42,7 +42,6 @@ from zExceptions import Unauthorized
from OFS.Image import manage_addFile from OFS.Image import manage_addFile
from cStringIO import StringIO from cStringIO import StringIO
from tempfile import mktemp from tempfile import mktemp
from zLOG import LOG
try: try:
from base64 import b64encode, b64decode from base64 import b64encode, b64decode
...@@ -425,7 +424,7 @@ class SubversionTool(UniqueObject, Folder): ...@@ -425,7 +424,7 @@ class SubversionTool(UniqueObject, Folder):
response = request.RESPONSE response = request.RESPONSE
login_list.append(self._encodeLogin(realm, user, password)) login_list.append(self._encodeLogin(realm, user, password))
value = ','.join(login_list) value = ','.join(login_list)
expires = (DateTime() + 1).toZone('GMT').rfc822() expires = (DateTime() + 7).toZone('GMT').rfc822()
request.set(self.login_cookie_name, value) request.set(self.login_cookie_name, value)
response.setCookie(self.login_cookie_name, value, path = '/', expires = expires) response.setCookie(self.login_cookie_name, value, path = '/', expires = expires)
...@@ -487,7 +486,7 @@ class SubversionTool(UniqueObject, Folder): ...@@ -487,7 +486,7 @@ class SubversionTool(UniqueObject, Folder):
response = request.RESPONSE response = request.RESPONSE
trust_list.append(self._encodeSSLTrust(trust_dict, permanent)) trust_list.append(self._encodeSSLTrust(trust_dict, permanent))
value = ','.join(trust_list) value = ','.join(trust_list)
expires = (DateTime() + 1).toZone('GMT').rfc822() expires = (DateTime() + 7).toZone('GMT').rfc822()
request.set(self.ssl_trust_cookie_name, value) request.set(self.ssl_trust_cookie_name, value)
response.setCookie(self.ssl_trust_cookie_name, value, path = '/', expires = expires) response.setCookie(self.ssl_trust_cookie_name, value, path = '/', expires = expires)
...@@ -592,7 +591,6 @@ class SubversionTool(UniqueObject, Folder): ...@@ -592,7 +591,6 @@ class SubversionTool(UniqueObject, Folder):
"""Commit local changes. """Commit local changes.
""" """
client = self._getClient(login=self.login) client = self._getClient(login=self.login)
#return client.checkin(self._getWorkingPath(path), log_message, recurse)
return client.checkin(path, log_message, recurse) return client.checkin(path, log_message, recurse)
security.declareProtected('Import/Export objects', 'status') security.declareProtected('Import/Export objects', 'status')
...@@ -683,7 +681,6 @@ class SubversionTool(UniqueObject, Folder): ...@@ -683,7 +681,6 @@ class SubversionTool(UniqueObject, Folder):
# svn add # svn add
for file in files_list: for file in files_list:
if file: if file:
LOG("addNew", 0, 'adding '+ str(file))
self.add(file.replace(new_dir, old_dir)) self.add(file.replace(new_dir, old_dir))
def treeToXML(self, item) : def treeToXML(self, item) :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment