[Zope-CMF] Trouble with security when I was embedding own ZClasses into CMF

Nico Grubert nico@beehive.de
Thu, 31 May 2001 15:45:46 +0100


Hi folks,

I am trying to embedd my own Product/Zclasses into the CMF.

In Zope I have created the following product / Zclass structure:

CDProduct (PRODUCT)
  |
  |--CD_Container (ZCLASS)
          | 
          |--CD  (ZCLASS)

CD-objects can only be added whithin a CD_Container, so first a
"CD_Container" has to be added before
one can add CD objects into that CD_Container.

I added a CMF-Site "myCMF" and within "myCMF" a created a CD_Container
"myCD_Container" where
I added a couple of CD objects.

Now, within "/myCMF/portal_types" I have added a new Factory-based Type
Information
"CD_Type". Works fine! 

Now, I click on "CD_Type" and see the Properties-View of
"Factory-based Type Information at  /myCMF/portal_types/CD_Type".
  I defined the following:
     	Meta type: CD
	Product name: CDProduct
	Factory method in product: CD_factory
	the list "Allowed content types" also contains "CD" which is the Meta
type of the ZClass "CD". Fine!

No lets access "myCMF". I click on "myCMF", then on "Folder contents"
and then I click the button [New...].
Now, the list of objects than can be addes is shown. I click the radio
button of
"CD_Type" to add a CD. I click [Add] and get a Login-window, although I
am logged in
as 'Manager' !!!??? So, if I cancel the Login-window i get the follwing
security error:

________________________________________________________________________________________
Site Error

             An error was encountered while publishing this resource. 

             Unauthorized

             Sorry, a site error occurred.

             Traceback (innermost last):
               File
C:\Programme\dev01_zope232\lib\python\ZPublisher\Publish.py, line 223,
in publish_module
               File
C:\Programme\dev01_zope232\lib\python\ZPublisher\Publish.py, line 187,
in publish
               File
C:\Programme\dev01_zope232\lib\python\ZPublisher\Publish.py, line 171,
in publish
               File
C:\Programme\dev01_zope232\lib\python\ZPublisher\mapply.py, line 160, in
mapply
                 (Object: invokeFactory)
               File
C:\Programme\dev01_zope232\lib\python\ZPublisher\Publish.py, line 112,
in call_object
                 (Object: invokeFactory)
               File
C:\Programme\dev01_zope232\lib\python\Products\CMFCore\PortalFolder.py,
line 368, in invokeFactory
                 (Object: Traversable)
               File
C:\Programme\dev01_zope232\lib\python\Products\CMFCore\TypesTool.py,
line 714, in constructContent
                 (Object: Traversable)
               File
C:\Programme\dev01_zope232\lib\python\Products\CMFCore\TypesTool.py,
line 471, in constructInstance
                 (Object: ElementWithAttributes)
             Unauthorized: Cannot create CD
__________________________________________________________________________________________

what is going wrong ????

I get also a strange Login window when I am in the path
"Z Class at 
/Control_Panel/Products/CD_collection/CD_container/propertysheets/methods"
and click on "propertysheets" which is in the path above !!?? any idea
why ???


many thanks in advance

best regards
Nico

----------------------------------------------------------------
nico grubert  (education & publishing)    nico@beehive.de
beehive elektronische medien GmbH         http://www.beehive.de
phone: +49 30 847-82 0                    fax: +49 30 847-82 299