[Zope3-dev] Protecting class methods

Sidnei da Silva sidnei@redesul.com.br
Mon, 14 Jul 2003 13:14:49 -0300


Howdy,

Still trying to support SQLObject, I came to a state where I need to
call SQLObject.new() which is a class method. It is failing with a
'ForbiddenAttribute: new' error when I try to call it. I tried to do:

<content class="myclass">
  <require 
      permission="zope.ManageContent"
      attributes="new" />
</content>

and

<class class="myclass">
  <require 
      permission="zope.ManageContent"
      attributes="new" />
</class>

But none of them seemed to take effect. Is there anything I can do to
assign a permission to this classmethod? Or am I better making an
instance method that calls it and protecting the instance method?

[]'s
-- 
Sidnei da Silva (dreamcatcher) <sidnei@redesul.com.br>
Debian GNU/Linux  2.4.20-powerpc ppc

-----------------------------------------------------------------------
Verified for virus by mail.redesul.com.br
Scanner: clamscan / ClamAV - Version 0.54 - Updated 08/07/2003