i am about to write a custom check in policy for Tfs.
the idea will be that base on the user privilege – he will be able to create disable the policy.
the user will have the option to Edit the policy.
-
does anybody familiar with a good example for create EDIT function (open new Dialog, set the policy properties…)
-
I am looking for best practice for retrieve the users privs. it Can’t be on a separated file – in need it to be generic for some Tfs projects , where should i store the Data?
at the tfs DB?, maybe via web service ?
When I had to write a custom check-in policy, I based it on LogSubstPol (code at http://logsubstpol.codeplex.com/)
LogSubstPol includes an edit dialog, and then saves the settings as a file in TFS. In my setup it made sense to have a consistent set of settings across all team projects, so I changed it from writing the settings per-project to using a global file at a known location in TFS. By saving it to TFS the preferences are version controlled, but you do have to have a file somewhere which isn’t related to your source code.
Some things to be aware of before writing the policy (these are all problems I’ve come across, whether they are problems to you depends on your scenario):