[Twisted-web] Get access to Avatar from Resource object?
jacek99 at gmail.com
Wed Feb 22 12:46:40 EST 2012
I am a bit more confused after this than before :-)
How can Avatar be a resource? It represents the actual user, correct?
Isnt' there a concept of a Principal / User that has nothing to do with
actual URL responses / routing / etc.
Sorry if I am asking basic questions, but sometimes it is hard to figure
out from the high-level docs how all the pieces fit together...
Thank you in advance
On Wed, Feb 22, 2012 at 11:59 AM, Glyph <glyph at twistedmatrix.com> wrote:
> On Feb 22, 2012, at 11:02 AM, Jacek Furmankiewicz wrote:
> But there are no examples on how a Resource method (let;s say render_GET)
> could get access to the current Avatar object?
> The avatar is a resource, and therefore it can pass itself (or any
> relevant authentication or authorization information) to its children as
> they are created.
> twisted.web doesn't implement role-based authorization or anything like
> it. If it did, it would use a specific object that implemented that
> role-based auth, not the avatar (which is an implementation of a protocol
> And does the Avatar object need to implement some specific interface?
> Yes, the Avatar object must provide IResource.
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-web