最近带着几个小伙伴干了个小项目,之前在公司都是svn的使用者,非管理者,所以就想借着干这个小项目顺便学svn的管理。
以往的感觉都是权限是分配出去的。但是折腾了几天svn管理以后,发现svn的权限是以收回的方式来管理的,真是有够笨笨的。
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
#先把组织架构编辑好
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
mu_group = zhangsan,xuqinmin
ddu_group = zhangsan,zhangming
au_group = zhangsan,panrenping
agu_group = zhangsan
sa_group = zhangsan,xuqinmin,tianliwei
su_group = zhangsan,zhangming
db_group = zhangsan,lixin
test_group =zhangsan,wangliguo
nmc_group = zhangsan,lizengqiang
all_staff = zhangsan,panrenping,xuqinmin,zhangming,wangliguo,lixin,lizengqiang
# [/foo/bar]
# harry = rw
# &joe = r
# * =
#让张三和administrator有对整个库的读写权限,其他用户是读权限
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
administrator =rw
@all_staff = r
</pre><pre code_snippet_id="1687860" snippet_file_name="blog_20160518_5_2857133" name="code" class="plain">
#在Requirement目录中先把读写权限都分配出去
[/01.Requirement]
chenxiaotian = rw
administrator = rw
@mu_group = rw
@au_group = rw
@ddu_group = rw
@agu_group = rw
@su_group = rw
@sa_group = rw
@db_group = rw
@nmc_group = rw
@test_group = rw
* =
#然后逐个收回,比如mu目录下只让张三和mu小组的人有读写权限,其他人的都收回
[/01.Requirement/mu]
@mu_group = rw
@nmc_group =
@au_group =
@ddu_group =
@agu_group =
@su_group =
@sa_group =
@db_group =
@test_group = r
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">上面的这个authz文件中注释写明了svn权限的工作原理</span>