I call the external method like this from DTML...


where path to user is a physical path, but I'm using the ZUserFolder, so I
can use the restrictedTraverse to get to users.  UserFolder has a different
API.  You could do this if your acl_users is a standard UserFolder...


in DTML or make your external method this...

def set_owner(self, user_name):

OK, so that should keep you busy for a while.  Anyway, the point is that the
parameter to changeOwnership is a User _object_.  Good luck.


-----Original Message-----
From: Magnus Heino (Rivermen) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 7:25 AM
To: 'Tim McLaughlin'; '[EMAIL PROTECTED]'; Magnus Heino (Rivermen)
Subject: SV: Subject: [Zope-dev] change ownership

I can get it to work :-/

I get an attributeerror on aq_inner in lib/python/AccessControl/Owned.py,
line 302, in ownerInfo

Seems as if the user i provide isn't of the right type?

How do you use your method? How is it being called?


> Magnus,
> No, changeOwnership is not exposed for TTW calling.  But you 
> can expose it
> through an external method...  I used this one on a ZClass.
> def set_owner(self, user):
>     self.changeOwnership(user)
>     return

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to