[Zope] Permissions, python product, problems

Mark Gibson mark@dimensional.com
Wed, 05 Jun 2002 15:04:23 -0600

Zope 2.5.1

Sometimes zope is a strange animal.

I'm creating a python product, and I've defined some permissions.

I want to see if the user has those permissions on an object.  Here's 
the DTML Method:

<dtml-var standard_html_header>
hasChange=<dtml-var "_.SecurityGetUser().has_permission('Change Job 

hasAdd=<dtml-var "_.SecurityGetUser().has_permission('Add Job 
<dtml-var standard_html_footer>


The output seems to show that those permissions aren't found on the 
folder at all:
hasChange=None hasAdd=None

But when I add the following line to the DTML Method:

<br />permission settings<dtml-var 
"_['BJobFolder'].permissionsOfRole('Manager')" size=40>

I get the following output, which seems to show those permissions were 
found.  Any ideas?

hasChange=1 hasAdd=1
permission settings[{'selected': 'SELECTED', 'name': ...