We are using sharepoint 2007. Anyone knows how to hide or disable New and upload menu from sharepoint document library
migrated from stackoverflow.com Jun 8 '12 at 14:49
This question came from our site for professional and enthusiast programmers.
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
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.
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.
Add if you want upload through code, use it through Elevated Priviledges
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:
|show 3 more comments|