Hi, Alessandro!
I'm trying to use Your solution.

I've got a question:
from *????* import TGController 

import TGController does not work...

Best regards.
Maxim.

вторник, 19 июня 2012 г., 0:28:58 UTC+4 пользователь Alessandro Molina 
написал:
>
> Static files are served by a middleware in the WSGI chain, 
> this runs before the authentication layer got in, so it doesn't have 
> any knowledge of users. 
>
> You can roll your own statics serving controller which checks users 
> and so on, a minima solution can be: 
>
> class StaticsController(TGController): 
>     @expose() 
>     def _lookup(self, *args): 
>         return WSGIAppController(StaticURLParser(statics_path)), args 
>
> On Mon, Jun 18, 2012 at 2:39 PM, abc_coder 
> <[email protected]<javascript:>> 
> wrote: 
> > Hi all 
> > 
> > I searched a lot but haven't found any solution. How can I in turgobears 
> 2 
> > restrict access to static files only for logged users? 
> > I want add some protection from unlogged users and web robots. 
> > 
> > Please help. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "TurboGears" group. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/turbogears/-/a6oOER4Ps3cJ. 
> > To post to this group, send email to 
> > [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:>. 
> > For more options, visit this group at 
> > http://groups.google.com/group/turbogears?hl=en. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to