将工作项字段限制为 TFS 2010 中的特定用户

发布于 2024-12-28 00:59:01 字数 870 浏览 6 评论 0原文

我正在使用 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 技术交流群。

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

发布评论

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

评论(2

还在原地等你 2025-01-04 00:59:01

我的结论是你不能这样做。在我被证明是错误的之前,TFS 2010 不支持此操作。

I have concluded that you cannot do this. Until I am proved wrong, this is not supported using TFS 2010.

你穿错了嫁妆 2025-01-04 00:59:01

我自己没有尝试过,但您应该能够在工作项模板中编辑它(我假设您已经做到了这一点,因为您已经从其中粘贴了一些 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.

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