[Zope-dev] Security Confusion :-S

Toby Dickenson tdickenson@geminidataloggers.com
Mon, 23 Oct 2000 16:20:28 +0100


On Mon, 23 Oct 2000 15:59:24 +0100, Chris Withers <chrisw@nipltd.com>
wrote:

(untested hints to follow)


>> class MyProduct(OFS.SimpleItem.SimpleItem): 
>>     """...
>>     """
>>         
>>     __ac_permissions__=(
>> 	('Use MyProduct'     ,    ('a_method',),('Manager',)),
>> 	)
>> 
>>     a_methodisDocTemp=1
>> 
>>     def a_method(self,ignored,md):
>>         list = []
>>         for name in self.get_contents():
>>             list.append(DisplayClass(name,self))

               list.append(DisplayClass(name,self).__of__(self))

>> 
>>         return list 
>
>The important bits of DisplayClass look like:
>
>> class DisplayClass(Globals.Persistent):

   class DisplayClass(Globals.Persistent, Acquisition.Implicit):


>>     """ """
>>         
>>     __allow_access_to_unprotected_subobjects__=1
>> 
>>     meta_type = 'CaseDisplay'
>> 
>>     __ac_permissions__=(
>> 	('View',    ('get_name',),('Anonymous',)),
>> 	)
>


Toby Dickenson
tdickenson@geminidataloggers.com