[Zope-dev] RFC: _verifyObjectPaste cleanup

2005-12-02 Thread yuppie

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=diffr1=24022r2=24021

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


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] RFC: _verifyObjectPaste cleanup

2005-12-02 Thread Dieter Maurer
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
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )