Edgewall Software

Changes between Version 1 and Version 2 of TracMultipleProjectsSVNAccess


Ignore:
Timestamp:
Feb 28, 2006, 4:42:16 AM (18 years ago)
Author:
Felix Collins
Comment:

Added comment about loss of project listing

Legend:

Unmodified
Added
Removed
Modified
  • TracMultipleProjectsSVNAccess

    v1 v2  
    11= How to control access to multiple projects using mod_authz_svn.so =
    22
     3== Introduction ==
    34This information applies to multiple project installs of Trac served through Apache. In principle the same information should apply to single project Tracs, but this hasn't been tested.  The examples come from a Windows environment but I can't see why a similar setup would not work elsewhere.
    45
    56It is convenient to keep all the access restrictions to a project in one place.  Trac already supports this for browsing of source code (see FineGrainedPermissions).  This page describes how to use the mod_authz_svn.so module to do this for the whole project. 
     7
     8== Matching repo and Trac names ==
    69
    710A prerequisite for this being really convenient is that your repositories have the same names as your Trac projects. Something like:
     
    1114}}}
    1215mod_authz_svn.so will still work if you do not have this setup but you will have to add additional access restrictions in the SVN access file.
     16
     17== mod_authz_svn ==
    1318
    1419The mod_authz_svn.so module simply takes a path, strips off the parent path and checks for a users access based on that stripped path, the users name and their access rights in the SVN access file.  It works stand alone from Subversion as a module in Apache so it may have other cunning uses, who knows...
     
    3035}}}
    3136
     37== Setting Access ==
    3238To get access to a Trac project the user must first pass any authentication you have in place.  They must then have access rights defined in the SVN access file.  If they have read only rights they will be able to view things in Trac but make no modifications.  If they have read and write they have the normal access. 
    3339
     
    3642For more information on the SVN Access file see the [http://svnbook.red-bean.com/en/1.1/ch06s04.html Subversion Book]
    3743
     44== Access to Trac for managers and testers==
    3845One other tip is for the situation where a user is read only on the repo but needs to create tickets in trac.  Simply create a section in the SVN access file for the newticket url.  Of course you must be careful that there is not actually a path in your repository that is called /newticket.
    3946
     
    4350user1 = rw
    4451}}}
     52
     53== A Problem ==
     54Using the setup as descibed above has one drawback.  You lose access to the default listing of Trac projects that was returned if you accessed the base Trac url with no project name. There may be a work around for this but I haven't yet found it.