Changing Permissions on New Branches
Hi,
I am working on a project to migrate from a custom version control system to Team System and I am currently investigating auditing possibilities. One preposed method is to have developers branch from the current project baseline, work in the new branch and then have an auditor merge the changes from the new branch to the baseline. The problem with this is that developers do not have checkin privileges on the project's baseline so when the baseline is branched, they cannot checkin code on the new branch. Is there a way to automatically change the privileges on this new branch to allow developers to checkin code? Or is there a way to allow developers to change the privileges themselves but without allowing them permission to do the same with the project's baseline code? I know this method is not the preferred way to work in Team System, but I need to find out if it is possible.
Thanks
Jason
Yes. You can build a service that subscribes to the Checkin event and runs permission commands as appropriate. The extensibility kit should have enough documentation to get started:
http://msdn.microsoft.com/vstudio/extend/customize/
Thanks. I am sorry about my last message, I know about setting up alerts in Team System. What I would really like to know is if there is some way to do the same thing, but without alerts, is transparent to the Developers who are creating the branch and is fully automated? The only reason I would like to find another way is that the documentation on the alerts says that they not guaranteed and this process needs to work reliably.
Jason
I don't think so -- whatever tool or script you build, it can't run under the dev's credentials (unless you gave devs admin rights, which defeats the purpose).
How often does this happen? Seems like a dev should only need to create a private branch once at most -- after he's done with it, rather than create a new one, he can use Merge to bring it up to date and start over. If it's not a frequent occurrence, then a "good enough" solution like alerts sounds appropriate.
Of course, what I really want to advise is to deny checkin permission on the main branch & use the shelving feature. Shelvesets are essentially private branches, but they make this workflow much easier to manage.