Cannot call "manage_copyObjects" from script with proxy roles
Bug #142717 reported by
Chris McDonough
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Fix Released
|
Low
|
Unassigned |
Bug Description
Script has proxy-role for manager and is called by anonymous:
id='foo'
clip=context.
context.
Error-message:
"The action against the id object could not be carried out. One of the following constraints caused the problem:
The object does not support this operation.
-- OR --
The currently logged-in user does not have the Copy or Move permission respective to the object. "
"You are not authorized to access this resource."
To post a comment you must log in.
patch (attachment leads to
insufficient privileges)
--- CopySupport.py~ 2003-06-10 09:10:14.000000000 +0200
+++ CopySupport.py 2003-11-13 14:40:08.000000000 +0100
@@ -23,6 +23,11 @@
from zExceptions import Unauthorized
from AccessControl import getSecurityManager
+# for "_verifyObjectP aste" fix
+from Globals import InitializeClass
+from Acquisition import Implicit
+from AccessControl import ClassSecurityInfo
+
CopyError='Copy Error'
_marker=[]
break
@@ -335,7 +340,15 @@
if mt_permission is not None: ger().checkPerm ission( mt_permission, self ): ger().checkPerm ission( mt_permission, self ): security. declareObjectPr otected( mt_permission) (_Proxy) ).__of_ _(self) ger().validate( None,self, None,_proxy) :
return
- if getSecurityMana
+ # DM: the following does not take executable security (owner
+ # ship, proxy roles) into account.
+ #if getSecurityMana
+ class _Proxy(Implicit):
+ security= ClassSecurityInfo()
+ _Proxy.
+ InitializeClass
+ _proxy= _Proxy(
+ if getSecurityMana
if not validate_src:
# Ensure the user is allowed to access the object on the