Not sure if this make sense for this piece of code, I do want to depend on as little as possible here configuration wise. Thanks, Les.
On Feb 1, 2012, at 3:27 PM, Les Hazlewood wrote: > Hi Lenny, > > I just saw the linked code - note that the ThreadContext is a Shiro > internal class and its usage semantics may change at any time. In > Shiro 1.2, the ideal way to acquire the SecurityManager is to look up > the Shiro WebEnvironment from the ServletContext (assuming you've > configured Shiro via a servlet context listener as is now > recommended): > > WebEnvironment env = WebUtils.getWebEnvironment(servletContext); > SecurityManager securityManager = env.getSecurityManager(); > > I don't know if this makes sense in the context of your project's (or > Tapestry's) inner workings, and this might just reflect the fact that > the code doesn't yet assume Shiro 1.2 practices, but I thought I'd > point it out in case it would be helpful. > > Cheers,
