Answered by:
Prevent users to create a new query

Question
-
Hi all,
I'm using TFs 2008 SP1.
Is there any way to prevent users making a new query on workitems "Add query" ?
Thanks in advance,
Scott.
Saturday, December 4, 2010 7:16 PM
Answers
-
Hello Scott,
What kind of Work Item Query do you want to create? My Queries or Team Queries? If you want to create My Query, you don’t need any permission, so you can’t prevent one to create My Query. If you want to prevent one to create Team Query, you should not grant administrator permission for that member, and he won’t be able to create a Team Query.
So please make sure these members you don’t want them to create Team Query do not administrator permissions.
You can use tfssecurity /m command to check out if one belongs to Team Foundation Administrator Group.
For more information about tfssecurity /m command, please see the following article:
http://msdn.microsoft.com/en-us/library/ms400696.aspx
Thanks,
Vicky Song [MSFT]
Please remember to mark the replies as answers if they help and unmark them if they provide no help- Proposed as answer by Vicky SongMicrosoft employee, Moderator Wednesday, December 8, 2010 3:00 AM
- Marked as answer by Vicky SongMicrosoft employee, Moderator Monday, December 13, 2010 4:15 AM
Wednesday, December 8, 2010 2:58 AMModerator -
Hello Scott,
Sorry for the late reply. As far as I know you can’t prevent one creating My Queries, and if one doesn’t have administrator permission, he is not able to create Team Queries.
For your issue, you can’t prevent one viewing one certain work item type. Because you can’t set permissions for work item type in TFS.
To deal with your issue, I suggest you put your certain work items in some area, and grant permission to access that area.
Please follow these steps below to have a try.
1). Please edit your work item type, add an Area field.
2). Create a new Area and grant permission for it.
Right-click your team project->Team Project Settings->Areas and Iterations->Create a new area.
Click the new created area and click Security button, select these users you don’t want them to access these work items, and Deny permissions View work items in this node, Edit work items in this node.
3).Put these work items you don’t want other member to access into that area.
This time when your team member create a new query, they don’t able to see these work items.
Note: 1). Just like I mentioned above, you can’t prevent one to view one certain work item type.
2). If you assign one work item in another area, if one have View work items in this node, Edit work items in this node on that area, they can also view or edit that work item. So please put all these work items you don’t want other members to access into to one certain area.
Thanks,
Vicky Song[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Proposed as answer by Vicky SongMicrosoft employee, Moderator Friday, December 10, 2010 4:53 AM
- Marked as answer by Vicky SongMicrosoft employee, Moderator Monday, December 13, 2010 4:15 AM
Friday, December 10, 2010 4:53 AMModerator
All replies
-
Hello Scott,
Thanks for your post.
For your issue, I think you can grant permissions for those team members who you don’t want them to create New Query.
To save a query, you must be a member of the Project Administrators group. To view a query, you must be a member of the Readers group or have the View work items in this node permission set to Allow.
For more information about the Team Foundation Server Permission, please see the following article:
http://msdn.microsoft.com/en-us/library/ms252587.aspx
Thanks,
Vicky Song [MSFT]
Please remember to mark the replies as answers if they help and unmark them if they provide no helpMonday, December 6, 2010 7:23 AMModerator -
Hello Vicky,
Thanks for ur reply.
I've registered users who want to stop them from creating a new query to the Readers group, But those users can still create a query and they are not part of any other group.
Any help will be appreciated
Scott.
Tuesday, December 7, 2010 7:00 AM -
Hello Scott,
What kind of Work Item Query do you want to create? My Queries or Team Queries? If you want to create My Query, you don’t need any permission, so you can’t prevent one to create My Query. If you want to prevent one to create Team Query, you should not grant administrator permission for that member, and he won’t be able to create a Team Query.
So please make sure these members you don’t want them to create Team Query do not administrator permissions.
You can use tfssecurity /m command to check out if one belongs to Team Foundation Administrator Group.
For more information about tfssecurity /m command, please see the following article:
http://msdn.microsoft.com/en-us/library/ms400696.aspx
Thanks,
Vicky Song [MSFT]
Please remember to mark the replies as answers if they help and unmark them if they provide no help- Proposed as answer by Vicky SongMicrosoft employee, Moderator Wednesday, December 8, 2010 3:00 AM
- Marked as answer by Vicky SongMicrosoft employee, Moderator Monday, December 13, 2010 4:15 AM
Wednesday, December 8, 2010 2:58 AMModerator -
Hello Vicky,
I want to prevent them creating both My Queries and Team Queries.
We have a lot of work item types and some these types are especially for project managers.
So I would like to block all users from creating any other query, even it's My query type, and use only the existing Queries.
Is there any way to achieve that?
Thanks in advance,
Scott.
Wednesday, December 8, 2010 7:41 AM -
Hello Scott,
Sorry for the late reply. As far as I know you can’t prevent one creating My Queries, and if one doesn’t have administrator permission, he is not able to create Team Queries.
For your issue, you can’t prevent one viewing one certain work item type. Because you can’t set permissions for work item type in TFS.
To deal with your issue, I suggest you put your certain work items in some area, and grant permission to access that area.
Please follow these steps below to have a try.
1). Please edit your work item type, add an Area field.
2). Create a new Area and grant permission for it.
Right-click your team project->Team Project Settings->Areas and Iterations->Create a new area.
Click the new created area and click Security button, select these users you don’t want them to access these work items, and Deny permissions View work items in this node, Edit work items in this node.
3).Put these work items you don’t want other member to access into that area.
This time when your team member create a new query, they don’t able to see these work items.
Note: 1). Just like I mentioned above, you can’t prevent one to view one certain work item type.
2). If you assign one work item in another area, if one have View work items in this node, Edit work items in this node on that area, they can also view or edit that work item. So please put all these work items you don’t want other members to access into to one certain area.
Thanks,
Vicky Song[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Proposed as answer by Vicky SongMicrosoft employee, Moderator Friday, December 10, 2010 4:53 AM
- Marked as answer by Vicky SongMicrosoft employee, Moderator Monday, December 13, 2010 4:15 AM
Friday, December 10, 2010 4:53 AMModerator