I've created a custom permission that only allows user to edit item, and not allow user to add or delete.

However, user is still able to drag and drop items into the document library and even replace existing ones when they shouldn't be able to.

Is there a way to restrict user from drag and drop?

Thanks in advance!


To stop users from creating new documents you can disable "New document" option by setting the Toolbar option of webpart to "No Toolbar"

To disable drag-drop use below code in script editor on same page

<script type="text/javascript">
// Stop Drag & Drop 
ExecuteOrDelayUntilScriptLoaded(function () { 
g_uploadType = DragDropMode.NOTSUPPORTED; 
SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED; }, "DragDrop.js");

#Hero-WPQ2 {
display: none ! important;

Blog link

  • Thank you for your suggestion! Although, is there a way to disable the drag and drop function to a specific group of users that have the same permission, say the visitors that have edit permission? – Marina Oct 16 '17 at 14:40
  • There is a way but I won't recommend it. If you check the code of drag-drop.js you can override the drop function add your custom code to page – Akshay Randive Oct 16 '17 at 16:30

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.