在 TFS 中为某些用户注册自定义签入策略 [英] Registering custom checkin policy for Certain users in TFS

查看:48
本文介绍了在 TFS 中为某些用户注册自定义签入策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为 TFS 创建了自定义签入策略.它被部署到客户端系统.我在 TFS 中为项目集合添加了自定义签入策略.但是我有很多客户端没有安装自定义签入策略,当这些开发者想要签入时,Visual Studio 显示错误

I have created custom checkin policy for TFS. It is deployed to the client system. I have added the custom checkin policy for project collection in TFS. But I have a number of clients that have not installed the custom checkin policy, when these developers want to check in, Visual Studio shows an error

检查 PMS 详细信息中的内部错误.加载检查 PMS 详细信息时出错...

所以我想为某些用户应用自定义签入策略.例如,用户是管理员,则无需运行自定义签入策略.

So I want to apply the custom checkin policy for certain users. For example the user is admin then no need to run the custom checkin policy.

推荐答案

正如其他人提到的,策略需要安装在客户端机器上才能工作.没有办法解决这个问题.但是,您可以在策略本身中检查进行签入的用户的身份和组成员身份,并在这种情况下跳过策略验证(始终返回一个空的 PolicyFailures 数组).

As others mention, the policy needs to be installed on the Client machine to work. There is no getting around that. You can, however, in the policy itself check the Identity and group membership of the user doing the check-in and skip the policy validation (always return an empty array of PolicyFailures) in that case.

我一直在制定这样的政策,但一直没有时间完成它.我一直在构建的策略与 TFS Power 工具中附带的 ConditionalPath 策略的工作方式相同.基本上,它包装了另一条(一组)规则并为其执行设置了条件.

I have been working on such a policy, but never found time to finish it. The policy I have been building works in the same way as the ConditionalPath policy that ships in the TFS Power tools. Basically it wraps another (set of) rules and places a condition on their execution.

这篇关于在 TFS 中为某些用户注册自定义签入策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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