From 390c50b4f3f30810f8fe5ffa85c8c7e565da891e Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Thu, 21 Oct 2004 14:53:57 +0000
Subject: [PATCH] do not use UnrestrictedUser

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1864 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5SyncML/SynchronizationTool.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/product/ERP5SyncML/SynchronizationTool.py b/product/ERP5SyncML/SynchronizationTool.py
index 2799cfc353..faff7c0901 100755
--- a/product/ERP5SyncML/SynchronizationTool.py
+++ b/product/ERP5SyncML/SynchronizationTool.py
@@ -827,7 +827,8 @@ class SynchronizationTool( SubscriptionSynchronization, PublicationSynchronizati
           #if gpg_key not in ('',None):
           #  result = self.sendResponse(domain=domain,xml=result,send=0)
           uf = self.acl_users
-          user = UnrestrictedUser('syncml','syncml',['Manager','Member'],'')
+          #user = UnrestrictedUser('syncml','syncml',['Manager','Member'],'')
+          user = uf.getUserById('syncml').__of__(uf)
           newSecurityManager(None, user)
           #self.activate(activity='RAMQueue').readResponse(sync_id=sync_id,text=result)
           self.readResponse(sync_id=sync_id,text=result)
@@ -839,7 +840,8 @@ class SynchronizationTool( SubscriptionSynchronization, PublicationSynchronizati
     """
     # Login as a manager to make sure we can create objects
     uf = self.acl_users
-    user = UnrestrictedUser('syncml','syncml',['Manager','Member'],'')
+    #user = UnrestrictedUser('syncml','syncml',['Manager','Member'],'')
+    user = uf.getUserById('syncml').__of__(uf)
     newSecurityManager(None, user)
     message_list = self.portal_activities.getMessageList()
     LOG('sync, message_list:',0,message_list)
@@ -860,7 +862,7 @@ class SynchronizationTool( SubscriptionSynchronization, PublicationSynchronizati
     #LOG('readResponse, text:',0,text)
     # Login as a manager to make sure we can create objects
     uf = self.acl_users
-    user = UnrestrictedUser('syncml','syncml',['Manager','Member'],'')
+    user = uf.getUserById('syncml').__of__(uf)
     newSecurityManager(None, user)
 
     if text is not None:
-- 
2.30.9