Welcome to Manicprogrammer Sign in | Join | Help

Restricting Ability to Run Build Types

In the MSDN Team Foundation - Build Automation Forums someone asked last night about restricting access so that only specific users could kick off specific build types. The question below:

"Is it possible to set up different permissions for different builds in the same TFS project? Currently, we have Dev build, QA build and Prod build, and we want only a couple of people to trigger Prod build."

It got me thinking. A very reasonable request and one I'm sure plenty of other folks have taken care of but I have not. My immediate thought was to control permissions on the actual build type folder in source control with the theory that if the user cannot see (read) the build type in version control then they will not see it in their list of build types and will not be able to run it. Guess what. It works. But you likely already knew that. It doesn't show up in Team Explorer in the build type list, nor can it be run from a command line with tfsbuild. All goodness.

If you have the scenario described above simply turn off inheritance on the build type folders you wish to restrict  in version control and set the security for read, label and lock at a minimum for the users that can run those builds. Don't forget to give Build Services the permissions for read, label and lock when you remove inheritance and  administrators full control. Removing inheritance removes all permissions and starts as a blank slate.

This all relates to TFS 2005 though I can't see why it would not also apply to TFS 2008 as well.

Published Wednesday, September 05, 2007 8:40 AM by michaelruminer
Filed under

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Thursday, September 06, 2007 9:02 AM by MickeyHeadShot Mickey Gousset

# VSTS Links - 09/06/2007

Brian Harry on Updated documentation on creating custom reports. GertD on Data Bound Generator Vs. Sequential...

Thursday, September 06, 2007 9:02 AM by Team System News

# VSTS Links - 09/06/2007

Brian Harry on Updated documentation on creating custom reports. GertD on Data Bound Generator Vs. Sequential...

Thursday, February 07, 2008 5:54 AM by Ryan

# re: Restricting Ability to Run Build Types

I just tried this in TFS2008, and it doesn't seem to work.  :(

Thursday, February 07, 2008 7:46 AM by michaelruminer

# re: Restricting Ability to Run Build Types

Really? I'm suprised. Kind of. Under 2008 much of the information for the build is in the database so I'd can see where a user would see it on Team Explorer since that is coming from the database information versus being able to read a specific folder. And if they can see it in Team Explorer they are be able to kick off the team build which then would be accessing the appropriate folder as build service which would have permission. Hmmm... there must be a solution that can be applied for 2008.

I'll check it out. THere may be something simple that can be done that I am not thinking of.

Monday, February 18, 2008 2:48 AM by Ryan

# re: Restricting Ability to Run Build Types

If you find anything, I'd love to see it here.  It seems like an obvious omission, and I hope there's a workaround.  The obvious usage, which we have, is where testers want to be able to publish their own test version of the project, and we don't want them to get into our development builds.


Enter the text you see in the image:

Leave a Comment

(required) 
required 
(required)