将 TFS 分支设置为只读

发布于 2024-07-25 22:16:51 字数 237 浏览 6 评论 0原文

我们正在尝试遵循 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

永言不败 2024-08-01 22:16:51

右键单击源代码管理资源管理器中的分支,然后选择锁定...选项

编辑:
当人们发现这一点时,这似乎被错过了很多,所以我会让它更明显。

对于锁定该项目的人来说,锁定显示为“待处理的更改”。 只要锁定有效,它就会显示为挂起的更改。 当提交该挂起的更改时,锁就会被释放。 当锁定生效时,锁定的分支实际上是只读的,因为(为了简化)锁定者是唯一可以进行提交的用户。 提交行为会释放分支上的所有锁。

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

凉墨 2024-08-01 22:16:51

作为一个快速肮脏的方法,您可以将其锁定以供签出(尽管储物柜必须记住将锁永远保留在其待处理的更改中......这让我认为有更好的方法)

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)

帅气尐潴 2024-08-01 22:16:51

要回答问题的第二部分——删除或拒绝读取权限实际上会拒绝其他一切。

To answer the 2nd part of the question -- removing or denying the Read permission effectively denies everything else.

唔猫 2024-08-01 22:16:51

如上所述,锁定并不是一个很好的策略。 处理这个问题的正确方法是设置权限。

您可以有效地将文件设为只读。 尝试修改文件的用户将收到一条消息“签出被拒绝”

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

百善笑为先 2024-08-01 22:16:51

拒绝域\域用户签入

Deny Check In for domain\domain users

眼泪也成诗 2024-08-01 22:16:51

如果您将继承设置为“打开”,我发现的最佳方法是:

  1. “拒绝”除“读取”之外的“读者”组的所有权限,并将
  2. 所有其他组(项目管理员除外)添加到“读者” ' 团体。

然后,Reader 组中的所有组都将继承“拒绝”权限,并且除了读取之外不能执行任何操作。

If you have inheritance set to 'On', the best way I've found is to:

  1. 'Deny' all permissions except 'Read' to the 'Reader' group, and
  2. Add all other groups (except Project Administrators) to the 'Reader' group.

Then, all groups within the Reader group will inherit the 'Deny' permissions and not be able to do anything but read.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文