SVN-用户目录权限 [英] SVN - User directory permissions

查看:480
本文介绍了SVN-用户目录权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SVN(CollabNet Subversion Edge)和Tortoise SVN来管理由多个人编辑的网站.

I'm using SVN (CollabNet Subversion Edge) and Tortoise SVN to manage a website being edited by multiple people.

我想限制某些用户对某些目录的访问(以防止他们看到数据库凭据等).他们只需要对一个目录的读取权限.

I'd like to limit access by some users to some directories (to prevent them seeing database credentials etc). They only require read access to one directory.

是否可以在SVN中执行此操作?

Is it possible to do this in SVN?

谢谢!

编辑

它们同时运行XP和Windows7.该服务器位于Windows 2008上. 使用的协议是http.

They are running a mix of XP and Windows 7. The server is on Windows 2008. The protocol being used is http.

推荐答案

这可以通过使用svnaccess.conf文件来实现.假设您使用Windows域身份验证,这是向Windows用户提供文件夹级访问的一种方法. (svnaccess.conf文件的示例部分)

This can be achieved by using the svnaccess.conf file. Assuming you use windows domain authentication, here is one way to provide folder-level access to windows users. (a sample section of the svnaccess.conf file)

[repo:/trunk/samplefolder]

[repo:/trunk/samplefolder]

* =

@repo_restricted_users = r

@repo_restricted_users = r

@repo_super_users = rw

@repo_super_users = rw

在这里,repo_restricted_users和repo_super_users是必须在svnaccess.conf文件中更早定义的用户组-因此:

Here, repo_restricted_users and repo_super_users are user groups which must be defined earlier in the svnaccess.conf file - thus:

repo_restricted_users = john.doe,tom.riddle

repo_restricted_users = john.doe, tom.riddle

repo_super_users = harry.potter,lord.voldemort

repo_super_users = harry.potter, lord.voldemort

这将提供对存储库中的文件夹samplefolder的只读访问权限,同时保持其他文件夹处于关闭状态.希望这会有所帮助.

This will provide read access to just the folder samplefolder within the repository while keeping other folders closed. Hope this helps.

这篇关于SVN-用户目录权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆