<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 22, 2012, at 11:02 AM, Jacek Furmankiewicz wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 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>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't implement role-based authorization or anything like it. &nbsp;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><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>And does the Avatar object need to implement some specific interface?</div></span></blockquote></div><br><div>Yes, the Avatar object must provide IResource.</div><div><br></div><div>-glyph</div></body></html>