On 25 Nov, 2005, at 8:17 am, Jorge Godoy wrote:
The SecureObject would be a Descriptor that checks authorisation  before
returning the instance object. Keep in mind this would require  you to satisfy
the authorisation criteria before accessing  toxicologia for *any* reason.

This is exactly what I want.  There's no "public" or "anonymous" access in
these areas.  ;-)

I just want to be extra clear about this: you won't be able to access an instance of SecureObject by any means unless the current identity satisfies the criteria you've specified. This means you can't access it under the covers or outside of a request (where there is no identity).

This would have the effect of securing all objects hung off  Toxicologia,
because CherryPy must first access the toxicologia  member of your Root
controller. And if the authorisation checks  failed, it wouldn't be able to
continue down your controller chain.

Is it overridable with aditional decorators?  I mean:

        Toxicologia    ->  lower restriction
             |_ View   ->  lower restriction
             |_ Update ->  medium restriction
             |_ Delete ->  higher restriction

You can apply whatever decorators you want on the methods of the Toxicologia instance. So each method could have additional restrictions. And Toxicologia could have SecureObjects as well. However, access to exposed methods of Toxicologia and any SecureObjects would have to satisfy the authorisation requirements for Toxicologia.

--

Jeff Watkins

http://newburyportion.com/


"Computers are like Old Testament gods; lots of rules and no mercy."

-- Joseph Campbell



Reply via email to