Hi, J Cameron!<br>With constructor I mean the function I use to create the object. In this case:<br>context.manage_addProduct['Yanged'].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 <<a href="mailto:jccooper@rice.edu">jccooper@rice.edu</a>>:</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>> Hi Andrew!<br>> In a normal method inside the product's class I use this:<br>> security = ClassSecurityInfo()<br>> security.setPermissionDefault('Freemind', ('Manager', 'Developer'))
<br>> security.declareProtected ('Freemind', 'freemind')<br>><br>> But outside the class I have no idea how to create security object<br>><br>> 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> --jcc<br><br><br>> 2007/7/24, Andrew Milton<br>> <<a href="mailto:akm@theinternet.com.au">
akm@theinternet.com.au</a><br>> <mailto:<a href="mailto:akm@theinternet.com.au">akm@theinternet.com.au</a>>>:<br>><br>> +-------[ Garito ]----------------------<br>> | Hi all!<br>> |<br>
> | How can I declare a product's constructor public?<br>> |<br>> | Thanks!<br>><br>> You have to declare a permission first such as: "Add Garito Product"<br>> when you<br>
> create your product, and register the class.<br>><br>> Then in the ZMI you simply add the roles you want access to that<br>> permission.<br><br>--<br>Connexions<br><a href="http://cnx.org">http://cnx.org
</a><br><br>"Building Websites with Plone"<br><a href="http://plonebook.packtpub.com">http://plonebook.packtpub.com</a><br><br>_______________________________________________<br>Zope maillist - <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>** No cross posts or HTML encoding! **<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>