[Erp5-report] r15754 - /erp5/trunk/products/ERP5SyncML/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Aug 21 13:50:21 CEST 2007
Author: nicolas
Date: Tue Aug 21 13:50:21 2007
New Revision: 15754
URL: http://svn.erp5.org?rev=15754&view=rev
Log:
Update user management, remove useless LOGs
Modified:
erp5/trunk/products/ERP5SyncML/Subscription.py
erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py
erp5/trunk/products/ERP5SyncML/SynchronizationTool.py
erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
Modified: erp5/trunk/products/ERP5SyncML/Subscription.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Subscription.py?rev=15754&r1=15753&r2=15754&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Subscription.py (original)
+++ erp5/trunk/products/ERP5SyncML/Subscription.py Tue Aug 21 13:50:21 2007
@@ -1037,7 +1037,7 @@
if callable(gid_gen):
o_gid = gid_gen(object)
else:
- raise ValueError, "The conduit "+conduit_name+"seems to no have a \
+ raise ValueError, "The conduit "+conduit_name+"seems to not have a \
getGidFromObject method and it must"
# elif getattr(o_base, gid_gen, None) is not None:
# generator = getattr(object, gid_gen)
Modified: erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py?rev=15754&r1=15753&r2=15754&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py (original)
+++ erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py Tue Aug 21 13:50:21 2007
@@ -31,6 +31,7 @@
from XMLSyncUtils import XMLSyncUtils, Parse
import commands
from Conduit.ERP5Conduit import ERP5Conduit
+from AccessControl import getSecurityManager
from DateTime import DateTime
from zLOG import LOG, DEBUG, INFO
@@ -46,8 +47,7 @@
subscription.initLastMessageId()
#save the actual user to use it in all the session:
- user = self.portal_membership.getAuthenticatedMember().getUserName()
- LOG('SubSyncInit, user saved :',DEBUG, user)
+ user = getSecurityManager().getUser()
subscription.setZopeUser(user)
subscription.setAuthenticated(True)
Modified: erp5/trunk/products/ERP5SyncML/SynchronizationTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/SynchronizationTool.py?rev=15754&r1=15753&r2=15754&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/SynchronizationTool.py (original)
+++ erp5/trunk/products/ERP5SyncML/SynchronizationTool.py Tue Aug 21 13:50:21 2007
@@ -979,13 +979,11 @@
This will try to synchronize every subscription
"""
message_list = self.portal_activities.getMessageList()
- LOG('sync, message_list:', DEBUG, message_list)
+ LOG('sync, len(message_list):', DEBUG, len(message_list))
if len(message_list) == 0:
for subscription in self.getSubscriptionList():
user = subscription.getZopeUser()
- LOG('sync, user :',DEBUG, user)
newSecurityManager(None, user)
- LOG('sync, type(subcription):', DEBUG, type(subscription))
self.activate(activity='RAMQueue').SubSync(subscription.getPath())
security.declarePublic('readResponse')
Modified: erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py?rev=15754&r1=15753&r2=15754&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py (original)
+++ erp5/trunk/products/ERP5SyncML/XMLSyncUtils.py Tue Aug 21 13:50:21 2007
@@ -798,7 +798,7 @@
local_gid_list = map(lambda x: domain.getGidFromObject(x),object_list)
# Objects to remove
- LOG('remove object to remove ...', DEBUG, '')
+ LOG('getSyncMLData remove object to remove ...', DEBUG, '')
object_gid_deleted = []
for object_gid in subscriber.getGidList():
if object_gid not in local_gid_list:
@@ -827,6 +827,7 @@
if max is not None and loop >= max:
result['finished'] = 0
break
+ LOG('getSyncMLData object_path', DEBUG, object_path)
object = self.unrestrictedTraverse(object_path)
status = self.SENT
object_gid = domain.getGidFromObject(object)
@@ -1449,7 +1450,7 @@
cmd_id = result['cmd_id']
return self.sendSyncModif(syncml_data, cmd_id_before_getsyncmldata,
subscriber, domain, xml_confirmation,
- remote_xml, xml_list, has_status_list,
+ remote_xml, xml_list, has_status_list,
has_response)
def SyncModifActivity(self, **kw):
@@ -1521,7 +1522,7 @@
domain=domain,
content_type=domain.getSyncContentType())
if syncml_data == '':
- LOG('this is the end of the synchronisation session !!!', DEBUG, '')
+ LOG('this is the end of the synchronisation session !!!', INFO, '')
subscriber.setAuthenticated(False)
domain.setAuthenticated(False)
has_response = 1
More information about the Erp5-report
mailing list