Registering custom checkin policy for Certain users in TFS

情到浓时终转凉″ 提交于 2019-12-08 04:20:32

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.

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.

Custom policies need to be installed onto the client system, they are not centrally processed.

A check in policy can be scoped only to the project level within TFS, as far as I am aware you are unable to limit a policy in any other way unless you handle this within the policy itself.

You must install your check-in policies on all TFS Windows clients, otherwise you get the nasty error.

A conditional policy can be implemented in two ways.

  1. set the condition inside the custom policy code
  2. use a Gated check-in build and customize the Build template

There is a third option, a Server side event handler, but I generally discourage it.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!