[Zope-CMF] [HELP] Use of "portal_metadata" in a DTML file

flemaitre@fede.generali.fr flemaitre@fede.generali.fr
Mon, 22 Apr 2002 15:56:59 +0200


Message en plusieurs parties au format MIME
--=_alternative 004CDFD5C1256BA3_=
Content-Type: text/plain; charset="us-ascii"

Hello,

I'm using the tool "portal_metadata"  in order to fix a policy of metadata 
for my site.
But i have a problem :
        - I'm making a DTML form wich allow my users to modify the 
Elements of the "portal_metadata" instance
        - In this DTML form, i get the list of metadata elements by using 
: "portal_metada.listElementSpecs()" ==> Ok
        - I want to access (and to modify) the detail of these elements by 
using :
                * portal_metadata.getElementSpec(element='My 
metadata').isRequired()
                * portal_metadata.getElementSpec(element='My 
metadata').isMultiValued()
                * etc....

         ==> It doesn't work, Zope says "You are not authorized to access 
isMultiValued", but i'm "Manager" what does it mean ?
        From the ZMI, the form "metadataElementPolicies.dtml" (of 
CMFDefault) does the same thing, and it's work.... Why ?



Thanks in advance.
Excuse my english.... ;-)
Fred.
--=_alternative 004CDFD5C1256BA3_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="sans-serif">Hello,</font>
<br>
<br><font size=2 face="sans-serif">I'm using the tool &quot;portal_metadata&quot; &nbsp;in order to fix a policy of metadata for my site.</font>
<br><font size=2 face="sans-serif">But i have a problem :</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; - I'm making a DTML form wich allow my users to modify the Elements of the &quot;portal_metadata&quot; instance</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; - In this DTML form, i get the list of metadata elements by using : &quot;portal_metada.listElementSpecs()&quot; ==&gt; Ok</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; - I want to access (and to modify) the detail of these elements by using :</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * portal_metadata.getElementSpec(element='My metadata').isRequired()</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * portal_metadata.getElementSpec(element='My metadata').isMultiValued()</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * etc....</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;==&gt; It doesn't work, Zope says &quot;You are not authorized to access isMultiValued&quot;, but i'm &quot;Manager&quot; what does it mean ?</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; From the ZMI, the form &quot;metadataElementPolicies.dtml&quot; (of CMFDefault) does the same thing, and it's work.... Why ?</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Thanks in advance.</font>
<br><font size=2 face="sans-serif">Excuse my english.... ;-)</font>
<br><font size=2 face="sans-serif">Fred.</font>
--=_alternative 004CDFD5C1256BA3_=--