Ah, I think I get it.<div><br></div><div>So Avatar = root resource that this user can access, correct?</div><div><br></div><div>That is quite flexible actually. It&#39;s like you can serve a totally different application (i.e. resource) to the user depending on their credentials/roles/etc.</div>
<div><br></div><div>I will wrap my head around it a bit more in the coming weeks and see how I can add the functionality I want (able to add fine grained security per REST method on a resource)</div><div>while working in spirit with the twisted.web.guard approach.</div>
<div><br></div><div>Thanks to everyone for your help</div><div><br></div><div>Jacek</div><div><br><div class="gmail_quote">On Thu, Feb 23, 2012 at 2:09 PM, Jerry Westrick <span dir="ltr">&lt;<a href="mailto:jerry@westrick.com">jerry@westrick.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
 
    
 
 <div>
  <p style="margin:0pt">
   <span>Okay, No one asked me, so I have the right to show off my ignorance :-) </span>
  </p>
  <p style="margin:0pt">
   <span>
    <span>
     <br>
    </span>
   </span>
  </p>
  <p style="margin:0pt">
   <span>
    <span>
     <br>
    </span>
   </span>
  </p>
  <p style="margin:0pt">
   <span>
    <span>But it sounds to me like you should build something called &quot;secureRealm&quot;, which</span>
   </span>
  </p>
  <p style="margin:0pt">
   <span>
    <span>which does security checks before requesting a resource from the IRealm?</span><span class="HOEnZb"><font color="#888888">
   </font></span></span><span class="HOEnZb"><font color="#888888">
  </font></span></p><span class="HOEnZb"><font color="#888888">
  <p style="margin:0pt">
   <span>
    <span>
     <br>
    </span>
   </span>
  </p>
  <p style="margin:0pt">
   <span>
    <span>
     Jerry
     <br>
    </span>
   </span>
  </p></font></span><div><div class="h5">
  <p style="margin:0px"></p>
  <p>
   <span> </span>
  </p>
  <div style="margin:5px 0px;font-family:monospace">
   <br>
   On February 23, 2012 at 1:33 PM Glyph Lefkowitz &lt;<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>&gt; wrote:
   <br>
   <br>
   &gt;
   <br>
   &gt; On Feb 23, 2012, at 12:37 PM, Jacek Furmankiewicz wrote:
   <br>
   &gt;
   <br>
   &gt; &gt; D&#39;oh!
   <br>
   &gt; &gt; That&#39;s what happens when you copy code from the web, sorry :-(
   <br>
   &gt; &gt;
   <br>
   &gt; &gt; So just a follow up to my other question: how do I add my child resources?
   <br>
   &gt;
   <br>
   &gt; However you like!  I&#39;m not sure what you&#39;re asking here; TestRealm returns a resource object, to which you may add child resources in any manner you see fit.  Usually this is done simply by having methods on that object (getChild) which can synthesize appropriate child resources when asked for them, but I wouldn&#39;t call that a &quot;best practice&quot; or anything; it&#39;s just something that makes sense a lot of the time.
   <br>
   &gt;
   <br>
   &gt; &gt; Does my TestRealm need to extend Resource? Is that the recommended approach?
   <br>
   &gt;
   <br>
   &gt; No.  TestRealm should *return* IResource providers (when asked for them - that&#39;s what the &#39;interfaces&#39; argument is for).  It itself should just provide IRealm, and it definitely shouldn&#39;t inherit from anything else.
   <br>
   &gt;
   <br>
   &gt; -glyph
   <br>
   &gt; _______________________________________________
   <br>
   &gt; Twisted-web mailing list
   <br>
   &gt; <a href="mailto:Twisted-web@twistedmatrix.com" target="_blank">Twisted-web@twistedmatrix.com</a>
   <br>
   &gt; <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web</a>
  </div>
 </div></div></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>