I am a bit more confused after this than before :-)<div><br></div><div>How can Avatar be a resource? It represents the actual user, correct?</div><div>Isnt&#39; there a concept of a Principal / User that has nothing to do with actual URL responses / routing / etc.</div>
<div><br></div><div>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... </div><div><br></div><div>Thank you in advance</div><div>Jacek<br>
<br><div class="gmail_quote">On Wed, Feb 22, 2012 at 11:59 AM, Glyph <span dir="ltr">&lt;<a href="mailto:glyph@twistedmatrix.com">glyph@twistedmatrix.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div class="im"><div>On Feb 22, 2012, at 11:02 AM, Jacek Furmankiewicz wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div>
But there are no examples on how a Resource method (let;s say render_GET) could get access to the current Avatar object?</div></span></blockquote><div><br></div></div><div>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.</div>
<div><br></div><div>twisted.web doesn&#39;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).</div>
<div class="im"><div><br></div><blockquote type="cite"><span style="border-collapse:separate;font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div>
And does the Avatar object need to implement some specific interface?</div></span></blockquote></div></div><br><div>Yes, the Avatar object must provide IResource.</div><span class="HOEnZb"><font color="#888888"><div><br></div>
<div>-glyph</div></font></span></div><br>_______________________________________________<br>
Twisted-web mailing list<br>
<a href="mailto:Twisted-web@twistedmatrix.com">Twisted-web@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web</a><br>
<br></blockquote></div><br></div>