[Zope-dev] Trying to set roles/permissions programmatically - Now I have a headache!

Dieter Maurer dieter@handshake.de
Fri, 27 Apr 2001 20:26:09 +0200 (CEST)


Danny William Adair writes:
 > I want to set the roles of a permission and turn acquisition of a permission
 > (mapping) on and off programmatically. And of course I want to get a
 > permission by its name. This looks definitely more complex than simply
 > changing an object's property!
My standard response to questions like this:

  You know, you can do this via the Management Interface.

  Its code will tell you, how you can do it: the necessary
  method names and their parameters.
  After you know the names, you look for further documentation:
  the Zope Help, maybe the new Zope Developer Guide,
  the source.

  The source for the updating of permissions is
  "AccessControl/dtml/access.dtml".
  The methods are defined in various Python files
  in "AccessControl".


Dieter