[Zope-dev] Virtual dataskinned ZClass instance

Godefroid Chapelle gotcha@swing.be
Wed, 18 Apr 2001 18:50:07 +0200


Hi all,

Being trying for more than three days to catch my problem,
reading ZPatterns and AccessControl code, I am lost.
I explain my situation again hoping someone can help me.


I create a ZClass HumanClass with the following characteristics:

  Base Classes  ZObject, _ZClass_for_DataSkin

  with one empty DataSkin Attribute Property Sheet.


I create a specialist with a default rack with the following
characteristics:

   Class to use for stored items: HumanClass

   Objects are: loaded by accessing attribute getNames

        where getNames is a python method in a DataSkin Class Extender.
It is defined as :

             import string
             list = string.split(context.id, '_')
             return list[1]

    The rack has also a SkinScript Method defined as following

             WITH self.getNames() COMPUTE prenom=RESULT



I get a unauthorized error if I then try to render, even with the
manager role, the following DTML stored in the specialist :

       <dtml-var standard_html_header>
       <h2><dtml-var title_or_id></h2>
       <dtml-with "defaultRack.getItem('100_Peter')">
       <dtml-var id>
       </dtml-with>
       <dtml-var standard_html_footer>


The error message is the following :

Traceback (innermost last):
               File
E:\BubbleNetTestSite\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
               File
E:\BubbleNetTestSite\lib\python\ZPublisher\Publish.py, line 187, in
publish
               File
E:\BubbleNetTestSite\lib\python\ZPublisher\Publish.py, line 171, in
publish
               File
E:\BubbleNetTestSite\lib\python\ZPublisher\mapply.py, line 160, in
mapply
                 (Object: index_html)
               File
E:\BubbleNetTestSite\lib\python\ZPublisher\Publish.py, line 112, in
call_object
                 (Object: index_html)
               File E:\BubbleNetTestSite\lib\python\OFS\DTMLDocument.py,
line 189, in __call__
                 (Object: index_html)
               File
E:\BubbleNetTestSite\lib\python\DocumentTemplate\DT_String.py, line 538,
in __call__
                 (Object: index_html)
               File
E:\BubbleNetTestSite\lib\python\DocumentTemplate\DT_With.py, line 146,
in render
                 (Object: defaultRack.getItem('100'))
               File E:\BubbleNetTestSite\lib\python\OFS\DTMLMethod.py,
line 261, in validate
                 (Object: index_html)
               File
E:\BubbleNetTestSite\lib\python\AccessControl\SecurityManager.py, line
144, in validate
               File
E:\BubbleNetTestSite\lib\python\AccessControl\ZopeSecurityPolicy.py,
line 168, in validate
             Unauthorized: id


Thanks to anyone who could help me...

--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel 010 457490
Mob 0477 363942

TVA 467 093 008
RC Niv 49849