将工作项字段限制为 TFS 2010 中的特定用户
我正在使用 TFS 2010,并且正在自定义工作项类型。我想知道是否有一种方法可以限制对属于组成员的用户的字段的访问,例如:
<FIELD name="Created By" refname="System.CreatedBy" type="String" syncnamechanges="true" reportable="dimension" />
<FIELD name="Project Manager" refname="CustomField.ProjectManager" type="String" reportable="dimension">
<HELPTEXT>The name of the project manager.</HELPTEXT>
<SUGGESTEDVALUES expanditems="true" filteritems="excludegroups">
<LISTITEM value="[global]\Project Managers" />
</SUGGESTEDVALUES>
<WHENNOT field="System.CreatedBy" value="CustomField.ProjectManager">
<READONLY />
</WHENNOT>
</FIELD>
编辑 有没有办法限制组内的特定用户,例如:限制项目经理“John”不能更改字段,因为该工作项不是他的项目,但允许项目经理“Jane”更改它,因为这是她的项目?
上面代码的问题在于 value
属性只接受字符串值,无法识别字段表达式。
I am using TFS 2010 and I am customizing a work item type. I was wondering, if there is a way to restrict access to fields to users that are members of a group such as:
<FIELD name="Created By" refname="System.CreatedBy" type="String" syncnamechanges="true" reportable="dimension" />
<FIELD name="Project Manager" refname="CustomField.ProjectManager" type="String" reportable="dimension">
<HELPTEXT>The name of the project manager.</HELPTEXT>
<SUGGESTEDVALUES expanditems="true" filteritems="excludegroups">
<LISTITEM value="[global]\Project Managers" />
</SUGGESTEDVALUES>
<WHENNOT field="System.CreatedBy" value="CustomField.ProjectManager">
<READONLY />
</WHENNOT>
</FIELD>
EDIT Is there a way to restrict a specific user inside a group, for instance: Restrict project manager "John" from changing the field because that work item is not his project, but permit project manager "Jane" to change it because it is her project?
The problem with the code above is that the value
attribute only accepts a string value and does not recognize a field expression.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的结论是你不能这样做。在我被证明是错误的之前,TFS 2010 不支持此操作。
I have concluded that you cannot do this. Until I am proved wrong, this is not supported using TFS 2010.
我自己没有尝试过,但您应该能够在工作项模板中编辑它(我假设您已经做到了这一点,因为您已经从其中粘贴了一些 XML :)?如果没有,它位于
Tools > 下。 Process Editor
菜单)使用字段中的 VALIDUSER 元素,请参阅 http://msdn.microsoft.com/en-us/library/aa337606(v=vs.90).aspx。Not tried this myself, but you should be able to edit this in the work item template (I assume you've already gotten that far since you've pasted some XML from it :)? If not it's under the
Tools > Process Editor
menu) using the VALIDUSER element in your FIELD, see http://msdn.microsoft.com/en-us/library/aa337606(v=vs.90).aspx.