[Zope] Problem with local roles

Danni Efraim danni@galdrion.com
Fri, 28 Sep 2001 16:24:25 +0200


Hi, people. I've got a problem I was hoping someone would be able to
help me with.

I'm working on a site where people can log in using a web form, and then
administer any pages they happen to have administration rights to. I
want people to be able to use the login form anywhere on the site (it's
in the navigation panel), but the administration links will only appear
when the actual rights to administer a page are present, and the
administration methods are of course restricted.

Anyway, the solution I thought would be adequate would be the following:

* Have a top-level UserFolder in which the content managers exist, but
having only the restricted role "Guest".

* Any user who's supposed to be able to administer a page will have the
local role of "ContentManager" in that folder.

This, however, does not work at all. No administration links appear, and
attempting to access the editing methods doesn't work.

And now to the weirder part. Adding a UserFolder to the folder, and
adding a user with the same name and password, and the role
"ContentManager" works just fine. Keeping dual user entries seems like a
maintenance nightmare, though.

I'm using Zope 2.3.3, with Python 2.1 on a Linux 2.4.7 (all those lovely
numbers!).

Am I doing something stupid, or is Zope being mean to me?

/Danni