SVN的授权和文件夹重命名
假设我想阻止某些用户访问我的 SVN 存储库中的某些文件夹。我只是这样做:
[/]
* = rw
[/NewSecretFolder]
* = rw
some_poor_sap =
但是如果该文件夹从 SecretFolder 重命名为 NewSecretFolder 会怎么样?用户 some_poor_sap 是否能够访问 /SecretFolder 的历史记录?
Say I want to prevent certain users form accessing certain folders in my SVN repo. I just do:
[/]
* = rw
[/NewSecretFolder]
* = rw
some_poor_sap =
But what if that folder was renamed from SecretFolder to NewSecretFolder? Will user some_poor_sap be able to access the history for /SecretFolder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,到时候他就能了。
您需要执行此操作
,然后在需要时允许所需用户的访问。我就是这样做的。
Yes, he will be able then.
You need to do
And then allow access to required users where needed. This is how I do that.
authz
文件授权机制完全基于路径,并忽略对象在其他版本中可能具有的不同名称。因此,当您访问某个版本的存储库时,将根据该版本的文件夹名称应用授权。因此,当我拥有这些授权时:
我将项目重命名为 MyRenamedProject,然后我像这样更改授权:
这里我将旧项目路径保留在 authz 文件中并授予读取访问权限,以确保开发人员始终可以读取重命名之前的项目历史记录。
另请注意,我们始终至少授予对根目录的读取访问权限,然后在项目授权中使用
* =
再次将其取消,以解决 奇怪的svn copy
问题。我怀疑这仅在您使用 apache 托管 SVN 时才有意义。The
authz
file authorization mechanism is entirely path based and ignores the different names an object may have at other revisions. So when you access the repository at a certain revision, the authorizations will be applied according to the folder names at that revision.So when I have these authorizations:
And I rename the project to
MyRenamedProject
, then I change the authorizations like this:Here I kept the old project path in the
authz
file and granted read access to ensure that the devs can always still read the history of the project from before the rename.Also note that we always grant at least read-access to the root and then take it away again with a
* =
in the project authorizations, to work around the strangesvn copy
issues. I suspect this is only relevant if you're using apache to host SVN.