I have this (internal) PythonMethod called filtered_meta_types
user=self.REQUEST.AUTHENTICATED_USER
meta_types=[]
if callable( self.all_meta_types ):
all=self.all_meta_types()
else:
all=self.all_meta_types
for meta_type in all:
if meta_type.has_key( 'permission' ):
# this is always false :(
if user.has_permission( meta_type['permission'], context ):
meta_types.append( meta_type )
else:
meta_types.append( meta_type )
return meta_types
I do not get why the 'has_permission' condition is always false
If I mimic this function in DTML (yuk), it *does* work.
TIA,
Stefan
--
Things work better when plugged in
_______________________________________________
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )