Re: Get access to Avatar from Resource object?

Jacek Furmankiewicz <[email protected]>
Newsgroups gmane.comp.python.twisted.web
Message-ID <CAGDztiHKLoZgFeq-=Ls9bNnS40HsH88gXh=9t=mqOMdc-6LHyQ@mail.gmail.com>
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
Jacek

On Wed, Feb 22, 2012 at 11:59 AM, Glyph <[email protected]> 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
> interface).
>
> And does the Avatar object need to implement some specific interface?
>
>
> Yes, the Avatar object must provide IResource.
>
> -glyph
>
> _______________________________________________
> Twisted-web mailing list
> [email protected]
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
>

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.