[Zope-dev] RE: Security and Acquisition?!

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 25 Oct 2000 10:05:44 +0100


> Anyone know what those attributes are?

Heres a good trick: add this method to your class to see which attributes it
is asked for, but doesnt implement.

     def __getattr__(self,id,reg={}):
         if not reg.has_key(id):
             print `id`
             reg[id]=id
         raise AttributeError(id)

> But these are very specific classes that exist for no longer than the
> duration of serving a single page request, and it'd just be 
> nice to know
> that they're not going to acquire and fluff they shouldn't...

An alternative approach: apply tighter security to the method that
constructs these objects, and leave the objects themselves completely open.