changing permissions in python
I have been searching everywhere for the correct syntax to use to change permissions on a dtml method from a python script. I know it could be using manage_changePermissions() but exactly how can I call it on any method. Regards Garry
On 13.10.2008 3:07 Uhr, Garry Saddington wrote:
I have been searching everywhere for the correct syntax to use to change permissions on a dtml method from a python script. I know it could be using manage_changePermissions() but exactly how can I call it on any method.
You know that security settings are either 'acquired' from the parent or defined on the related object itself..so what is the problem with appyling this to your usecase? Andreas
Garry Saddington wrote at 2008-10-13 08:07 +0100:
I have been searching everywhere for the correct syntax to use to change permissions on a dtml method from a python script. I know it could be using manage_changePermissions() but exactly how can I call it on any method.
Do not use "manage_changePermissions". This method is designed a action for the corresponding management interface page. In order to use it, you must build the request in the same way as the action submit would do it -- difficult and very error prone. Instead use "manage_permission". It sets the roles/acquire-flag for a single permission (e.g. the "View" permission). You call it directly on the object for which you want to change the permissions, e.g. the "dtml method". -- Dieter
participants (3)
-
Andreas Jung -
Dieter Maurer -
Garry Saddington