SV: Subject: [Zope-dev] change ownership

Magnus Heino (Rivermen) magnus.heino@rivermen.se
Thu, 10 May 2001 15:23:19 +0200


The one that comes with Zope.

/Magnus

> -----Ursprungligt meddelande-----
> Fr=E5n: Tim McLaughlin [mailto:tim@BCSWebservices.net]
> Skickat: den 10 maj 2001 15:26
> Till: 'Magnus Heino (Rivermen)'; Tim McLaughlin
> Kopia: 'zope-dev@zope.org'
> =C4mne: RE: Subject: [Zope-dev] change ownership
>=20
>=20
> What kind of UserFolder are you using... LoginManager or something?
>=20
> -----Original Message-----
> From: Magnus Heino (Rivermen) [mailto:magnus.heino@rivermen.se]
> Sent: Thursday, May 10, 2001 9:13 AM
> To: 'Tim McLaughlin'; Magnus Heino (Rivermen)
> Cc: 'zope-dev@zope.org'
> Subject: SV: Subject: [Zope-dev] change ownership
>=20
>=20
>=20
> > def set_owner(self, user_name):
> >   self.changeOwnership(self.acl_users.getUser(user_name))
> >=20
> > OK, so that should keep you busy for a while.  Anyway, the=20
>=20
> Not long enough :-P
>=20
> > point is that the
> > parameter to changeOwnership is a User _object_.  Good luck.
>=20
> Ive got this external method in a zclass:
>=20
> def setObjectOwner(self, username):
>     self.changeOwnership(self.acl_users.getUser(username))
>=20
> I call it like=20
> http://localhost:8080/myobject/setObjectOwner?username=3Dfoo
> and get this error:
>=20
>=20
>=20
>   Zope Error
> Zope has encountered an error while publishing this resource.
>=20
> Error Type: AttributeError
> Error Value: aq_inner
>=20
>=20
>=20
> --------------------------------------------------------------
> --------------
> ----
>=20
> Troubleshooting Suggestions
>=20
> The URL may be incorrect.=20
> The parameters passed to this resource may be incorrect.=20
> A resource that this resource relies on may be encountering an error. =

> For more detailed information about the error, please refer=20
> to the HTML
> source for this page.=20
>=20
> If the error persists please contact the site maintainer.=20
> Thank you for your
> patience.=20
> =20
>=20
>=20
>=20
> Traceback (innermost last):
>   File=20
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/ZPublisher/Publish.py,
> line 223, in publish_module
>   File=20
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/ZPublisher/Publish.py,
> line 187, in publish
>   File=20
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/Zope/__init__.py, line
> 221, in zpublisher_exception_hook
>     (Object: PLATS_1)
>   File=20
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/ZPublisher/Publish.py,
> line 171, in publish
>   File=20
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/ZPublisher/mapply.py,
> line 160, in mapply
>     (Object: setObjectOwner)
>   File=20
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/ZPublisher/Publish.py,
> line 112, in call_object
>     (Object: setObjectOwner)
>   File
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/Products/Extern
> alMethod/Exter
> nalMethod.py, line 262, in __call__
>     (Object: setObjectOwner)
>     (Info: ((<FooObject instance at 873bd78>, 'david'), {}, None))
>   File=20
> /usr/home/magnus/www/Zope-2.3.2-src/Extensions/Owner.py, line 2, in
> setObjectOwner
>     (Object: PLATS_1)
>   File
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/AccessControl/O
> wned.py, line
> 168, in changeOwnership
>     (Object: PLATS_1)
>   File
> /usr/home/magnus/www/Zope-2.3.2-src/lib/python/AccessControl/O
> wned.py, line
> 302, in ownerInfo
> AttributeError: (see above)
>=20