[Zope-dev] Modification Help

Adrian van den Dries adriand@flow.com.au
Tue, 18 Mar 2003 08:55:45 +1100


On March 17, mattficken@mail.com wrote:
> I am trying to develop a program that generates a top-level folder
> within zope and then has one of its functions called to give permission
> to access the folder, as opposed to using the standard Zope permission
> system. As I understand it the only way to do this is to modify the core
> zope software. 

Like everything else in Zope, assigning permissions and roles can be
done programmatically.  So, if you want to dynamically grant a role a
particular permission (or conversely, grant a user a role), you could
do it with a Python script that calls container.manage_permission or
container.manage_role as appropriate, and give that script the Manager
proxy role, ensuring it is only callable by appropriate users.

But I strongly suspect there is a better way to solve your problem,
probably with local roles.  If you describe what you're really trying
to achieve, perhaps we can help you achieve it in a more Zopish way.

When you say "top-level folder", do you mean the root folder (which is
not really a folder), or one level down?

a.

-- 
 Adrian van den Dries                           adriand@flow.com.au
 Development team                               www.dev.flow.com.au
 FLOW Communications Pty. Ltd.                  www.flow.com.au