Hi, J Cameron!<br>With constructor I mean the function I use to create the object. In this case:<br>context.manage_addProduct[&#39;Yanged&#39;].CrearYanged(NuevaId)<br><br>CrearYanged<br><br>How can I convert it to public?
<br><br>Thanks!<br><br><div><span class="gmail_quote">2007/7/24, J Cameron Cooper &lt;<a href="mailto:jccooper@rice.edu">jccooper@rice.edu</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Garito wrote:<br>&gt; Hi Andrew!<br>&gt; In a normal method inside the product&#39;s class I use this:<br>&gt; security = ClassSecurityInfo()<br>&gt; security.setPermissionDefault(&#39;Freemind&#39;, (&#39;Manager&#39;, &#39;Developer&#39;))
<br>&gt; security.declareProtected (&#39;Freemind&#39;, &#39;freemind&#39;)<br>&gt;<br>&gt; But outside the class I have no idea how to create security object<br>&gt;<br>&gt; Can I put a code like this outside the class?<br>
<br>No. Permission for a constructor is set when you register it, usually in<br>the __init__.py. (context.registerClass)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--jcc<br><br><br>&gt; 2007/7/24, Andrew Milton<br>&gt; &lt;<a href="mailto:akm@theinternet.com.au">
akm@theinternet.com.au</a><br>&gt; &lt;mailto:<a href="mailto:akm@theinternet.com.au">akm@theinternet.com.au</a>&gt;&gt;:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; +-------[ Garito ]----------------------<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; | Hi all!<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; | How can I declare a product&#39;s constructor public?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; |<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; | Thanks!<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; You have to declare a permission first such as: &quot;Add Garito Product&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; when you<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; create your product, and register the class.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Then in the ZMI you simply add the roles you want access to that<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; permission.<br><br>--<br>Connexions<br><a href="http://cnx.org">http://cnx.org
</a><br><br>&quot;Building Websites with Plone&quot;<br><a href="http://plonebook.packtpub.com">http://plonebook.packtpub.com</a><br><br>_______________________________________________<br>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">
Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br><br clear="all"><br>-- <br>
Mis Cosas<br><a href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a>