Hi! Basically I'd like to remove the workaround introduced to fix http://www.zope.org/Collectors/Zope/78 : http://svn.zope.org/Zope/trunk/lib/python/OFS/CopySupport.py?view=diff&r1=24... checkPermission now respects proxy roles, so this workaround is no longer needed. Replacing the workaround by a checkPermission call will make the 'permission' key in all_meta_types required, the 'action' key becomes optional. The old code did have a fallback for meta_types without 'permission' key. This is the comment for the fallback: # XXX: Ancient cruft, left here in true co-dependent fashion # to keep from breaking old products which don't put # permissions on their metadata registry entries. Is it save to make the 'permission' key required? Or do we need the fallback for 'ancient cruft'? There might be new products that don't set the 'permission' key because it wasn't enforced until now. I propose to - leave Zope 2.7 untouched - use checkPermission in Zope 2.8 and add the fallback with deprecation warning - make the 'permission' key required in Zope 2.9 and later Any comments? Cheers, Yuppie
yuppie wrote at 2005-12-2 16:50 +0100:
... checkPermission now respects proxy roles, so this workaround is no longer needed.
But we should also have some way to check permissions without proxy roles: It sometimes is useful for something with a proxy role to check whether the user (without a proxy) could perform the operation as well. Thus, if "checkPermission" changed its behaviour, it probably should get an optional parameter to get the old behaviour back. Otherwise, I am happy with your cleanup. -- Dieter
Hi Dieter! Dieter Maurer wrote:
yuppie wrote at 2005-12-2 16:50 +0100:
... checkPermission now respects proxy roles, so this workaround is no longer needed.
But we should also have some way to check permissions without proxy roles:
It sometimes is useful for something with a proxy role to check whether the user (without a proxy) could perform the operation as well.
Thus, if "checkPermission" changed its behaviour, it probably should get an optional parameter to get the old behaviour back.
Sounds reasonable, but I didn't fix checkPermission and I don't feel responsible for adding a parameter like that. Maybe this is something for the collector...
Otherwise, I am happy with your cleanup.
Fine. Cheers, Yuppie
participants (2)
-
Dieter Maurer -
yuppie