<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
 <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
 </head>
 <body>
  <p style="margin: 0pt;">
   <span>Okay, No one asked me, so I have the right to show off my ignorance :-)&#160;</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 &#34;secureRealm&#34;, which</span>
   </span>
  </p>
  <p style="margin: 0pt;">
   <span>
    <span>which does security checks before requesting a resource from the IRealm?</span>
   </span>
  </p>
  <p style="margin: 0pt;">
   <span>
    <span>
     <br/>
    </span>
   </span>
  </p>
  <p style="margin: 0pt;">
   <span>
    <span>
     Jerry
     <br/>
    </span>
   </span>
  </p>
  <p style="margin: 0px; "></p>
  <p>
   <span>&#160;</span>
  </p>
  <div style="margin: 5px 0px; font-family: monospace;">
   <br/>
   On February 23, 2012 at 1:33 PM Glyph Lefkowitz &#60;glyph@twistedmatrix.com&#62; wrote:
   <br/>
   <br/>
   &#62;
   <br/>
   &#62; On Feb 23, 2012, at 12:37 PM, Jacek Furmankiewicz wrote:
   <br/>
   &#62;
   <br/>
   &#62; &#62; D&#39;oh!
   <br/>
   &#62; &#62; That&#39;s what happens when you copy code from the web, sorry :-(
   <br/>
   &#62; &#62;
   <br/>
   &#62; &#62; So just a follow up to my other question: how do I add my child resources?
   <br/>
   &#62;
   <br/>
   &#62; However you like!&#160; 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.&#160; 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 &#34;best practice&#34; or anything; it&#39;s just something that makes sense a lot of the time.
   <br/>
   &#62;
   <br/>
   &#62; &#62; Does my TestRealm need to extend Resource? Is that the recommended approach?
   <br/>
   &#62;
   <br/>
   &#62; No.&#160; TestRealm should *return* IResource providers (when asked for them - that&#39;s what the &#39;interfaces&#39; argument is for).&#160; It itself should just provide IRealm, and it definitely shouldn&#39;t inherit from anything else.
   <br/>
   &#62;
   <br/>
   &#62; -glyph
   <br/>
   &#62; _______________________________________________
   <br/>
   &#62; Twisted-web mailing list
   <br/>
   &#62; Twisted-web@twistedmatrix.com
   <br/>
   &#62; http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
  </div>
 </body>
</html>