Just add this script in the header of Content.master file:
To download the updated content.master file:
Also, To prevent any web users not to view any of source or build pages, Go to IIS and do the following:
1) Open TFS web site in IIS.
2) Expand tfs and then UI folder.
3) Select Build folder.
4) Double click on Authentication and disable Windows and Anonymous access to this folder.
5) Do the same for Scc folder which has all source tab pages.
With these 2 steps, we added security on the folder level in addition to hide Build and Source tabs.
Hope this helps!
UPDATE 03/13/2011: This workaround works after installing TFS SP1.