[Zope-CMF] Creator info not properly cataloged
Ivo van der Wijk
ivo@amaze.nl
Sat, 16 Nov 2002 23:04:22 +0100
On Sat, Nov 16, 2002 at 08:42:44PM +0100, Dieter Maurer wrote:
> Ivo van der Wijk writes:
> > After putting my locally developed CMF site online, I noticed that
> > references to here/Creator were replaced with 'Anonymous User', while
> > the object definately had a proper owner (and still has).
> "Creator" is defined by means of "getOwner".
>
> The Owner of your documents is apparently wrong.
> Check, what "owner_info" tells you for your objects.
>
It returns 'Anonymous user'. It does this, because Owned.getOwner()
attempts to find the userfolder the user is defined in, but fails,
because the location (relative to the physicalRoot) changed.
this part of getOwner to be more specific:
root=self.getPhysicalRoot()
udb=root.unrestrictedTraverse(udb, None)
if udb is None:
user = SpecialUsers.nobody
else:
user = udb.getUserById(oid, None)
Ivo
--
Drs. I.R. van der Wijk -=-
Brouwersgracht 132 Amaze Internet Services V.O.F.
1013 HA Amsterdam, NL -=-
T +31-20-4688336 F +31-20-4688337 Linux/Web/Zope/SQL/MMBase
W http://www.amaze.nl E info@amaze.nl Network Solutions
W http://vanderwijk.info E ivo@amaze.nl Consultancy
PGP http://vanderwijk.info/pgp -=-