Question

I am trying to restrict access to both adding a new file and uploading a file to a SharePoint Online Document Library, but without removing permissions from users, I just need those two buttons to disappear, or just the full toolbar to disappear, and I also need to remove the edit functionality, then again, without removing permissions. If nothing happened when the buttons were pressed, it would also be fine. Is it possible to do this? Please note I'm a beginner at SharePoint and I may need a more detailed answer. I have been looking around with SharePoint Designer with no luck, I managed to get rid of the new and edit forms in a List but I can't figure out how do to it in a document library.

EDIT: Any solution will work as long as access is restricted.

EDIT 2: The reason why I need to do this is because I am accessing this document library from a K2 form outside SharePoint Online, and users should not be able to directly access the library.

EDIT 4: Sorry for the edit 3, I needed to block metadata editing, I just created a blank edit form for the library.

Was it helpful?

Solution

Yes, you can do this easily. New/Upload buttons for a Document library are available at two locations. We will work on those seperately

  1. In top Ribbon under "File" tab. At this location you can use script editor webpart and hide the section completely. Click on site setting Icon -> EditPage -> Insert a webpart -> choose Script editor under Media and content -> and insert below script:

    #Ribbon.Documents.New{ display: none; }

  2. Hide from Library action ribbon. This we can simply do by setting "No toolbar" in web part properties. Click on site setting Icon -> Edit page -> Click on Edit web part -> select "no toolbar" -> Apply & OK

enter image description hereenter image description here

Edit location for Edit Page enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top