将 TFS 分支设置为只读
我们正在尝试遵循 TFS 分支指南 中的分支策略,并且已经达到了创建分支的程度代表一个版本,现在应该设为只读。
在分支的“属性|安全”选项卡中,它显示了六个用户组,每个用户组具有除读取之外的 10 个权限。 我是否必须检查并单击 60 个复选框上的“拒绝”,还是有更好的方法使该分支变为只读?
We are trying to follow the branching strategy from the TFS Branching Guide and have reached the point where we have made a branch representing a release, which should now be made read-only.
In the Properties|Security tab for the branch, it presents six user groups each with 10 permissions other than Read. Do I have to go through and click Deny on 60 check boxes, or is there a better way to make this branch read-only?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
右键单击源代码管理资源管理器中的分支,然后选择锁定...选项
编辑:
当人们发现这一点时,这似乎被错过了很多,所以我会让它更明显。
对于锁定该项目的人来说,锁定显示为“待处理的更改”。 只要锁定有效,它就会显示为挂起的更改。 当提交该挂起的更改时,锁就会被释放。 当锁定生效时,锁定的分支实际上是只读的,因为(为了简化)锁定者是唯一可以进行提交的用户。 提交行为会释放分支上的所有锁。
h/t @AakashM 在评论中指出了这一点
Right-click the branch in the Source Control Explorer, and select the Lock... option
EDIT:
This seems to get missed a lot when people are finding this so I'll make it more obvious.
Locks appear as a "pending change" for the person who locked the item. As long as the lock is in effect, it will appear as a pending change. When a commit is made of that pending change, the lock is released. While the lock is in effect, the locked branch is effectively read-only, since (to simplify) the locker is the only user who can make commits. The act of committing is what releases any locks on the branch.
h/t @AakashM for pointing that out in the comments
作为一个快速肮脏的方法,您可以将其锁定以供签出(尽管储物柜必须记住将锁永远保留在其待处理的更改中......这让我认为有更好的方法)
As a quick-n-dirty, you could Lock it for Check Out (although the locker would have to remember to keep the lock in their pending changes forever... which makes me think there's a better way)
要回答问题的第二部分——删除或拒绝读取权限实际上会拒绝其他一切。
To answer the 2nd part of the question -- removing or denying the Read permission effectively denies everything else.
如上所述,锁定并不是一个很好的策略。 处理这个问题的正确方法是设置权限。
您可以有效地将文件设为只读。 尝试修改文件的用户将收到一条消息“签出被拒绝”
https:/ /msdn.microsoft.com/en-us/library/ms252587.aspx#project_level
在 VS2013 中:团队资源管理器 -> 设置-> 安全/版本控制
As is mentioned above locking is not a very nice strategy. The correct way of handling this is setting permissions.
You can effectively make files readonly. Users trying to modify the files will get a message 'checkout denied'
https://msdn.microsoft.com/en-us/library/ms252587.aspx#project_level
In VS2013: Team Explorer -> Settings -> Security/Version Control
拒绝域\域用户签入
Deny Check In for domain\domain users
如果您将继承设置为“打开”,我发现的最佳方法是:
然后,Reader 组中的所有组都将继承“拒绝”权限,并且除了读取之外不能执行任何操作。
If you have inheritance set to 'On', the best way I've found is to:
Then, all groups within the Reader group will inherit the 'Deny' permissions and not be able to do anything but read.