[Zope] Declare constructor as public

2007-07-24 Thread Garito

Hi all!

How can I declare a product's constructor public?

Thanks!

--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@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 )


Re: [Zope] Declare constructor as public

2007-07-24 Thread Andrew Milton
+---[ 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.

-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@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 )


Re: [Zope] Declare constructor as public

2007-07-24 Thread Garito

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?

Thanks!

2007/7/24, Andrew Milton [EMAIL PROTECTED]:


+---[ 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.

--
Andrew Milton
[EMAIL PROTECTED]





--
Mis Cosas
http://blogs.sistes.net/Garito
___
Zope maillist  -  Zope@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 )