[Zope] Re: Declare constructor as public
Garito
garito at sistes.net
Tue Jul 24 10:44:19 EDT 2007
Hi, J Cameron!
With constructor I mean the function I use to create the object. In this
case:
context.manage_addProduct['Yanged'].CrearYanged(NuevaId)
CrearYanged
How can I convert it to public?
Thanks!
2007/7/24, J Cameron Cooper <jccooper at rice.edu>:
>
> Garito wrote:
> > Hi Andrew!
> > In a normal method inside the product's class I use this:
> > security = ClassSecurityInfo()
> > security.setPermissionDefault('Freemind', ('Manager', 'Developer'))
> > security.declareProtected ('Freemind', 'freemind')
> >
> > But outside the class I have no idea how to create security object
> >
> > Can I put a code like this outside the class?
>
> No. Permission for a constructor is set when you register it, usually in
> the __init__.py. (context.registerClass)
>
> --jcc
>
>
> > 2007/7/24, Andrew Milton
> > <akm at theinternet.com.au
> > <mailto:akm at theinternet.com.au>>:
> >
> > +-------[ Garito ]----------------------
> > | Hi all!
> > |
> > | How can I declare a product's constructor public?
> > |
> > | Thanks!
> >
> > You have to declare a permission first such as: "Add Garito Product"
> > when you
> > create your product, and register the class.
> >
> > Then in the ZMI you simply add the roles you want access to that
> > permission.
>
> --
> Connexions
> http://cnx.org
>
> "Building Websites with Plone"
> http://plonebook.packtpub.com
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
--
Mis Cosas
http://blogs.sistes.net/Garito
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070724/357f3487/attachment.htm
More information about the Zope
mailing list