[Zope-PTK] Portal Copy Cut Paste run ??
Eric Brun
eric.brun@etu.univ-savoie.fr
Wed, 22 Nov 2000 14:51:45 +0100
I propose a method for correct this bug in PortalFolder :
Place it in PortalFolder.py
What do you think of this method ?
def _verifyObjectPaste(self,id='',REQUEST=None):
""" Redefinition de la méthode car elle ne marche pas pour CUT/COPY/PASTE """
user=self.getAuthenticatedMember()
if hasattr(self,'__roles__'):
roles = getattr(self,'__roles__')
if self.has_local_roles():
liste=self.get_local_roles()
e=()
for i in liste:
e=e+tuple(i[1])
roles=roles+e
if (not hasattr(user, 'has_role') or not user.has_role(roles, self)):
raise 'Unauthorized', ("""Vous n'etes pas autorisé a executer cette commande.""")
else: print "PortalFolder : pas de roles\n"
return
Eric