[Zope-dev] manage_role : HELP

Jean-Louis BERLIET jl.berliet@triade.tm.fr
Thu, 27 Apr 2000 10:30:09 +0200


I have a problem with the "manage_role" function in my product, when i try
to create a "EspaceProjet" :

--------------------

class EspaceProjet(ObjectManager, PropertyManager, RoleManager, Collection,
                   OFS.SimpleItem.Item, FindSupport):

   __ac_permissions__=(
     ('Add Espace Projet',('manage_addEspaceProjet',),
       ('Manager','Animateur')),
   )

   def __init__(self):
       if not ('Animateur' in self.userdefined_roles()):
           self._addRole('Animateur')
           self.manage_role('Animateur', ['View',
                                          'View management screens',
                                          'Add Folders',
                                          'Delete objects',
                                          'Access contents information',
                                          'FTP access',
                                          'Manage properties',
                                          'Manage users',
                                          'Undo changes',
                                          'Add Espace Projet'
                                          ] )

----------------------

The message is :

<H2>Zope Error</H2>

<P>Zope has encountered an error while publishing this resource.

</P>


<P>

<STRONG>Error Type: AttributeError</STRONG><BR>

<STRONG>Error Value: aq_acquire</STRONG><BR>

...

File D:\JLB\Zope\lib\python\Products\EspaceProjet\EspaceProjet.py, line 32,
in manage_addEspaceProjet

File D:\JLB\Zope\lib\python\Products\EspaceProjet\EspaceProjet.py, line 73,
in __init__

(Object: ElementWithAttributes)

File D:\JLB\Zope\lib\python\AccessControl\Role.py, line 177, in manage_role

(Object: ElementWithAttributes)

File D:\JLB\Zope\lib\python\AccessControl\Role.py, line 136, in
ac_inherited_permissions

(Object: ElementWithAttributes)

File D:\JLB\Zope\lib\python\OFS\ObjectManager.py, line 173, in
_subobject_permissions

(Object: ElementWithAttributes)

AttributeError: (see above)