[Zope] How to know who an object's owner is
Jérôme Loisel
jerome@levinux.org
Thu, 1 Mar 2001 19:11:12 -0500
Le Mardi 27 Février 2001 14:09, vous avez écrit :
> Zope objects have a method called owner_info used to get ownership info
> in DTML for display. In Python you can use the getOwner method of the
> object.
>
> owner_info returns a dictionary like so:
>
> {'userCanChangeOwnershipType': 1, 'id': 'cduncan', 'explicit': 1,
> 'path': 'acl_users'}
Interesting, thanks for the info. I did some weird tests I already had a
acl_users/jerome user. I created an additional levinux/acl_users/jerome user
with a different password and different roles. The path information allows me
to distinguish between objects created by one or the other.
But what is the equivalent for AUTHENTICATED_USER? How do I know which
"jerome" is visiting my site? I know that as long as my permissions are set
properly, it does not really matter for security, but I am curious. I would
like to show this in the site admin screens.
Anecdote: I find it interesting how Zope will try to match my password with
all "jerome" users before deciding which account I want to log into... :-)
--
Jérôme Loisel
Lévinux: GNU/Linux dans les communautés à Lévis