Hi, I'm working on a python product. My question is about finding wich permission protects a given method, in order to generate or not some links in the product's management interface. Those links are class dependant, so I need to ask the class for which ones it does support (something like manage_options) and then check the ones the user has rights on. Currently I do this by looking at the class and some of the __bases__ classes __ac_permissions__ but I think zope may provide a more convenient way to do this. Does it? TIA -- //// (@ @) ---------------------------oOO----(_)----OOo------------------------ Los pecados de los tres mundos desapareceran conmigo. Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain) --------------------------------------------------------------------
Alexis Roda wrote at 2003-10-30 09:35 +0100:
I'm working on a python product. My question is about finding wich permission protects a given method, in order to generate or not some links in the product's management interface.
"DocFinder" may help you. <http://www.dieter.handshake.de/pyprojects/zope> You will need Zope 2.6.2 or use "ZOPE_SECURITY_POLICY=PYTHON", in order that it can derive the permission name controlling access to a method. -- Dieter
participants (2)
-
Alexis Roda -
Dieter Maurer