We are using sharepoint 2007. Anyone knows how to hide or disable New and upload menu from sharepoint document library

  • 3
    ummm??manage it with permissions. What is different in your requirement? – Shoban Jun 8 '12 at 7:40
  • users will have full control access and to upload fie in document library we have designed the custom upload page so we don't want show the new and upload options to the users. is it possible doing this by coding ? Thanks a lot for taking time to understand the question.. – Rushikesh Jun 9 '12 at 20:47
  • Are you allowed to use jQuery and javascript on your page? We do this on 2007 because we don't have server access and we also cant use custom actions in 2007. – spevilgenius Jun 15 '12 at 13:17
  • Yes we can use jquery or javascript.It is allowed – Rushikesh Jun 18 '12 at 13:28

Yes, you can hide/disable buttons using the custom action. See more details http://blogit.create.pt/blogs/andrevala/archive/2008/08/11/SharePoint-2007-Deployment_3A00_-Custom-Action-Features.aspx

| improve this answer | |

I would expect this to work off the document library permissions if you browse to the real location of the document library. You would need to only allow 'Read' access to this document library for those user who you not wish to upload or create new documents.

You can have some control over the Documents web part which can be pointed to your document library and have its 'Toolbar Type' setting set to 'No Toolbar'. You can divert users to a page with such a web part set up which might give you the desired results.

| improve this answer | |
  • I have tried the No Toolbar option but this option removes all four options..we want to hide or disable only New and Upload options of the document library – Rushikesh Jun 9 '12 at 20:49
  • I think in that case you should just change the permissions on the list. Unless you want to have a go at modifying a copy of the out of the box doc library schema... I'm not sure whether that will allow the level of control that you need. – Zeb Jun 10 '12 at 12:42

Just give read Permissions to users

Select the Document Library

Goto Setings >Document Library Settings

Select Permissions for this document library under Permissions and Management

Permission page opens with list of all Existing permission.

  • If the set of users is already existing, check on their names and Select Actions > Edit Permissions. Out of the permissions select Read and then OK.
  • If new users are supposed to be given permission, Select New List the users separated by semicolon in the Box. Out of the permissions select Read and then OK.

Add if you want upload through code, use it through Elevated Priviledges

                  //Code to upload

Other way is you can hide them through script in a Content Editor Webpart. Then no need of above coding and giving Read permissions.

Script to hide upload and New menu:

var aTags=document.getElementsByTagName('a');

for(i=0; i < aTags.length; i++)







| improve this answer | |
  • @SPDoctor : Edited the answer – Ankita Sen Jun 15 '12 at 12:28
  • Hi Thanks for the answer.. I tried this but one problem like when user with read permission uploads the file in document library it shows System account in Modified By column – Rushikesh Jun 18 '12 at 13:25
  • @Rushikesh : See updated Answer with Script. – Ankita Sen Jun 19 '12 at 5:50
  • Hi ankita I have added the script in content editor web part but no success.. :( – Rushikesh Jun 19 '12 at 12:06
  • @Rushikesh uncomment the alert lines and check if alert is fired or not – Ankita Sen Jun 19 '12 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.