Am Montag, 15. August 2005 00:54 schrieb Paul Winkler:
> The trunk should now be in usable condition, I hope. I´m sorry it was
> broken for so long.
> I am on vacation now, and unlikely to respond in this thread again
> until I return on 8/21.
> Within a week thereafter, I hope to tag and release zsyncer 0.7-beta1.

Hi Paul,

thanks for the info. Just to let you know, I just cvs upped to the trunk, but 
unfortunately syncing didn't work for me.

To make a long story short, i append a small diff against the trunk that seems 
to work for me (not thoroughly tested, though, and not perfect about 

Heres what happened: I've always seen this error:

        Module Products.ZSyncer.ZSyncer, line 1503, in call_
        Module copy_reg, line 69, in _reduce_ex
        TypeError: can't pickle function objects

Which I can get around by changing line 1501 of from

        result = sys.exc_info()[:2]
        result = (str(sys.exc_info()[0]), str(sys.exc_info()[1]))

Which in turn tells me, that security bites me. This happens no matter if I 
use the current account or the http://username:[EMAIL PROTECTED]/. I double 
checked permissions, Manager Role is Allowed to "User ZSyncer" and "View 
Management Screens".

Good news is, Dieter gave a hint about to exchange "validateValue" with 
"validate", which seems to help (at least for the username:password thingy; 
it still wont sync with the current user for me).

Incidentally, I stumbled about a problem when an object is on the remote 
syncer, but not the local, which seems to be fixed by an addition to an 
except clause; and finally I found that if you want to browse ZClasses for 
syncing, a reordering of an if/elif is necessary.

Hope someone finds it useful.

Cheers, Sascha
diff -u -r1.69
---  11 Aug 2005 20:31:29 -0000      1.69
+++  15 Aug 2005 20:03:19 -0000
@@ -649,10 +649,10 @@
             obj_info = {}
         # Get the sub-objects.
-        if getattr(aq_base(path_object), 'isPrincipiaFolderish', 0):
-            sub_objects = path_object.objectValues()
-        elif _isZClassFolder(path_object):
+        if _isZClassFolder(path_object):
             sub_objects = path_object.propertysheets.methods.objectValues()
+        elif getattr(aq_base(path_object), 'isPrincipiaFolderish', 0):
+            sub_objects = path_object.objectValues()
             sub_objects = []
         for ob in sub_objects:
@@ -759,7 +759,7 @@
                 # not guaranteed to be correct when virtual hosting.
                 # Someday this should go away.
                 full = '/'+obj.absolute_url(relative=1)
-        except (KeyError, NotFound):
+        except (ZSyncerObjNotFound, KeyError, NotFound):
             # No object found, maybe Extra. Fall back to the original.
             full = relative = path
         request = self.REQUEST
@@ -1322,7 +1322,7 @@
         obj = self.traverseFromRoot(path)
         method = getattr(obj, method_name)
         sm = getSecurityManager()
-        if not sm.validateValue(method):
+        if not sm.validate(self, self, method_name, method):
             user = sm.getUser().getId()
             err ="User %s is not allowed to call %s here" % (user,
@@ -1486,7 +1486,7 @@
         method_name, args, kw= loads(request)
             method = getattr(self, method_name)
-            if not getSecurityManager().validateValue(method):
+            if not getSecurityManager().validate(self, self, method_name, method):
                 raise Unauthorized
             result = method(*args, **kw)
             ok = 1
@@ -1498,7 +1498,7 @@
             # informative about it.
             self._logException('Exception in call_')
             # We want to send back the exception.
-            result = sys.exc_info()[:2]
+            result = (str(sys.exc_info()[0]), str(sys.exc_info()[1]))
             ok = 0
         return dumps((ok, result), 1)
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to