Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top