[Zope] permissions (+ acquisition)

massimop at users.berlios.de massimop at users.berlios.de
Tue Oct 12 13:23:08 EDT 2004


hi,

I probably shouldn't start coding without a good knowledge of my tools,
but this is the way I usually learn...

I'm developing a small CMS-like (I know, there's CMF, Plone etc, but I'm
playing...:))

the point is that I have site, say http://localhost:8080/test, with a
subfolder for each registered user, an 2 page templates, view and edit

this methods are in /test and are meant to work via acquisition so with
http://localhost:8080/test/user/view 
any user (even anonymous) should view user data and with
http://localhost:8080/test/user/edit 
only 'user' should edit the same data

I can't figure out how to set permissions...

as a workaround I modified edit to check user roles via
getRolesInContext and assigned to each user the Owner role in his
folder, leaving Ownership to admin (hope this is legitimate)

I would prefer though a solution based only on Zope automatic
roles/permissions management, without any test

I hope it's clear
thanks for any hint
massimo







More information about the Zope mailing list