权限控制
svn根目录在E:/sh_team下现建了两个仓库文件夹project和finished,project文件夹下有group,test1文件夹。finished文件夹下有doc和test2文件夹。有三个帐户admin user1 user2 密码都为123456
要求admin有所有的读写权限,user1能写group,doc.user2能写test1和test2。
修改:
<Location /sh_team>
DAV svn
SVNListParentPath on
SVNParentPath E:/sh_team
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile passwd
AuthzSVNAccessFile svnaccessfile <-要添加的文件名,和passwd同在apache根目录下,可见SVN配置安装教程(二)相关.
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
(用apache做为服务器)在apache的根目录下建立svnaccessfile.conf 写入
如下:
[groups]
developers1 = user1
developers2 = user2
admin = admin
#to allow everyone read access
[/]
* = r
@admin = rw
[project:/group]
@developers1 = rw
[project:/test1]
@developers2 = rw
[finished:/doc]
@developers1 = rw
[finished:/test2]
@developers2 = rw
project和finished后要有" : " 写完后去掉.conf扩展名,要编辑时在加上。
关于某个帐户只能读写某些文件
我用的是apache+svn,我已经建了两个版本库,原来配置如下:
[groups]
admin = sy
guest = nick
[/]
* = r
[xmx:/]
@admin = rw
[test:/]
@guest = rw
sy和nick都可以checkout xmx和test版本库,现在希望admin只可以checkout xmx,guest只可以checkout test
只需把下列框中的代码加上红色部分即可实现你的功能。
----------------------------------------------------------------------------
[groups]
admin = sy
guest = nick
[/]
* = rw
[xmx:/]
@admin = rw
*=
[test:/]
@guest = rw
*=
---------------------------------------------------------------------------
加上 *= 就可以了
http://groups.google.com/group/iusesvn/browse_thread/thread/dd2c1483ad74914d