(``-_-´´) -- Fernando wrote: > On Tuesday 01 April 2008 20:37:02 [EMAIL PROTECTED] wrote: >> Hi, >> >> How can I make sure user needs to log in before he can access trac? I >> have tried this command, but i can see browser the code without >> logging in. >> $ trac-admin /path/to/projenv permission remove anonymous '*' >> >> Thank you for any help.
I'm still "brand-new" to trac (installed it yesterday :-)), so I'm not sure if there is a "trac-way of doing things", but I've configured it in Apache and it seems to be working quite well. Of course you'll need Apache for this solution :-) Note how "/trac" is unprotected, so everybody can see a list of available projects without logging in. This is what I wanted, but if you don't want that, the setup just becomes even simpler... Then the entire "/trac/" - location has access restrictions, so everybody has to log in before they can access ANY project. And they are automatically logged in when they access project pages. In this case, I am the only one who can access "everything" under trac and a second user "Siegi" has access to two other projects (just named "sample1" and "sample2" below :-)) This is quite flexible and hopefully very secure :-) (I'm in the process of "bullet-proofing" my apache with SSL and even client certificates for some locations...) This is work in progress... Maybe the LocationMatch should be "^/trac/"... Just try it out... Also, this won't give people any funny ideas of trying to access internal URLs to check all trac permissions... :-) Hope this helps, Holger Here we go: <Location /trac> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir f:\dev\trac PythonOption TracUriRoot /trac </Location> <LocationMatch "/trac/"> AuthType Basic AuthName "Trac" AuthUserFile "f:/Apache/pw/.htpasswd" Require user Holger </LocationMatch> # list of projects that are accessible for Siegi (and Holger) <LocationMatch "/trac/(sample1|sample2)"> AuthType Basic AuthName "Trac" AuthUserFile "f:/Apache/pw/.htpasswd" Require user Holger Require user Siegi </LocationMatch> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
