Search code examples
tfsvisual-studio-2015tfs-2015tfvc

In TFS 2015, how do I block contributors from checking into a branch while allowing the project administrators branch?


I'm working with TFS 2015 using the ALM Rangers Development & Release Isolation Branching Strategy and Team Foundation Version Control. I would like to keep developers from checking code into the Main branch and letting them only work in Dev and Release branches. I want to allow the Project Administrators and above to perform the merges and check ins to Main.

With Team Web Access:

  • I selected the drop-down next to my Main branch and selected "Security".
  • Set Inheritance to "Off".
  • For Contributors, Set Check in and a few other permissions to "Deny".
  • Saved Changes.
  • For Project Administrators, set the same permissions to "Allow"
  • Saved Changes.
  • TFS changed the values of each of the Project Administrators permissions to "Inherited deny*"

I have heard that setting "deny" can cause problems. Now I understand why I was told that. Is there a way to achieve my stated goal above, through standard TFS permission settings?


Solution

  • Cann’t reproduce your problem with the same settings in my TFS2015.

    According to TFS permission setting, most groups and almost all permissions, Deny trumps Allow. If a user belongs to two groups, and one of them has a specific permission set to Deny, that user will not be able to perform tasks that require that permission even if they belong to a group that has that permission set to Allow.

    To achieve what you want, you can create a new group such as DenyMainGroup. Adding the developers to this group. Make sure your project administrator members don’t belong to it. For this group, set Check in and a few other permissions to “Deny”. For Contributors and Project Administrators, set the same permissions to”Allow”. Saved Changes.