tfs2012 - Is there a way to disable check-in permission based on file extension in TFS 2012? -


i need allow designer work on .aspx,.css,*.html .... etc , disable permission *.cs files.

is there way in tfs 2012?

you write custom checkin policy this:

// method performs actual policy evaluation.  // called policy framework @ various points in time // when policy should evaluated. in example, method  // invoked when various asyc events occur may have  // invalidated current list of failures. public override policyfailure[] evaluate() {     string proposedcomment = pendingcheckin.pendingchanges.comment;     if (pendingcheckin.pendingchanges.any(x => x.filename.endswith(".cs")) && currentuser.cannoteditcodefiles)     {         return new policyfailure[] {             new policyfailure("you not authorized edit *.cs files.", this) };     }     else     {         return new policyfailure[0];     } } 

this code won't compile because added pseudo code in there example approach should cover use case.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -