SOLVED

Why delete permission is required to rename a document in SP Document Library?

%3CLINGO-SUB%20id%3D%22lingo-sub-45902%22%20slang%3D%22en-US%22%3EWhy%20delete%20permission%20is%20required%20to%20rename%20a%20document%20in%20SP%20Document%20Library%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-45902%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20manage%20our%20controlled%20documents%20in%20SPO%20and%20for%20contributors%20we%20give%20only%20contribute%20without%20delete%20permissions.%20Now%20the%20problem%20is%2C%20due%20to%20this%20permission%20level%20they%20are%20not%20able%20to%20change%20the%20document%20name%20via%20Edit%20Properties.%20Why%20is%20it%20so%20and%20is%20there%20any%20workaround%20for%20this%3F%20Thanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-Prashant.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-45902%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-279601%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20delete%20permission%20is%20required%20to%20rename%20a%20document%20in%20SP%20Document%20Library%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-279601%22%20slang%3D%22en-US%22%3E%3CP%3EYes%20there%20is%20a%20work%20around%20to%20solve%20this%20problem%20which%20I've%20done%20already%2C%3C%2FP%3E%3CP%3Eyou%20can%20simply%20add%20the%20following%26nbsp%3BjavaScript%20to%20watch%20DOM%20changes%20in%20your%20master%20page%2C%20to%20remove%20delete%20option%20for%20(document%2C%20folder%2C%20workflow%2C%20etc...)%20.%3C%2FP%3E%3CP%3EI%20wrote%20this%20code%20to%20remove%20%22delete%22%20and%20also%20to%20deactivate%20delete%20action%20from%20Keyboard%20if%20document%20was%20selected%20and%22delete%22%20button%20was%20pressed%2C%20without%20disabling%20delete%20button%20from%20being%20used%20in%20the%20web%20page%20(ex.%20text%20boxes%2C%20text%20areas%2C%20etc..)%2C%20and%20this%20can%20be%20done%20by%20overriding%20confirmation%20method%20%22window.confirm%22.%3C%2FP%3E%3CP%3EThe%20attached%20screen%20shots%20shows%20the%20output%20after%20editing%20master%20page%20and%20publishing.%3C%2FP%3E%3CP%3EYou%20can%20add%20the%20following%20script%20directly%20under%20the%20%20tag%20in%20your%20master%20page%20html.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSCRIPT%20type%3D%22%26quot%3Btext%2Fjavascript%26quot%3B%22%3E%2F%2F%26amp%3Bamp%3Bamp%3Blt%3B!%5BCDATA%5B%26amp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20mutationObserver%20%3D%20new%20MutationObserver(function(mutations)%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bmutations.forEach(function(mutation)%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20objDelete%20%3D%20document.getElementById(%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3BID_DeleteDocItem%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3B)%20%7C%7C%20false%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20objDeleteItem%20%3D%20document.getElementById(%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3Bctl00_PlaceHolderMain_ctl00_ctl00_toolBarTbl_RptControls_diidIODeleteItem_LinkText%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3B)%20%7C%7C%20false%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20objDeleteVersions%20%3D%20document.getElementById(%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3Bctl00_PlaceHolderMain_MngVersionToolBar_RptControls_diidDeleteVersions_LinkText%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3B)%20%7C%7C%20false%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20objDeleteItem2%20%3D%20document.getElementById(%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3BID_DeleteItem%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3B)%20%7C%7C%20false%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20objDeleteUserFromSCollection%20%3D%20document.getElementById(%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3Bctl00_PlaceHolderMain_UserListForm_ctl00_ctl00_ctl00_toolBarTbl_RptControls_diidIODeleteItem_LinkText%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3B)%20%7C%7C%20false%3B%26amp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bgt%3Bif(objDelete)%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20firstParent%20%3D%20objDelete.parentNode%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BfirstParent.parentNode.removeChild(firstParent)%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bif(objDeleteItem)%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20firstParent%20%3D%20objDeleteItem.parentNode%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BfirstParent.parentNode.removeChild(firstParent)%3B%26amp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bgt%3B%7D%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bif(objDeleteItem2)%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20firstParent%20%3D%20objDeleteItem2.parentNode%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BfirstParent.parentNode.removeChild(firstParent)%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bif(objDeleteVersions)%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20firstParent%20%3D%20objDeleteVersions.parentNode%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BfirstParent.parentNode.removeChild(firstParent)%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bif(objDeleteUserFromSCollection)%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20firstParent%20%3D%20objDeleteUserFromSCollection.parentNode%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BfirstParent.parentNode.removeChild(firstParent)%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D)%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D)%3B%26amp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bgt%3BmutationObserver.observe(document.documentElement%2C%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Battributes%3A%20true%2C%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BcharacterData%3A%20true%2C%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BchildList%3A%20true%2C%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bsubtree%3A%20true%2C%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BattributeOldValue%3A%20true%2C%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3BcharacterDataOldValue%3A%20true%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D)%3B%26amp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bwindow.confirm%20%3D%20function(message)%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bif(message.indexOf(%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3BRecycle%20Bin%3F%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3B)%20!%3D%20-1)%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Breturn%20false%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%20else%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bvar%20responseConfirm%20%3D%20prompt(message%2C%20%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3BConfirm%26amp%3Bamp%3Bamp%3Bamp%3Bquot%3B)%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Bif%20(responseConfirm%20!%3D%20null)%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Breturn%20true%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%20else%20%7B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3Breturn%20false%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%7D%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%2F%2F%5D%5D%26amp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bgt%3B%3C%2FSCRIPT%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F58498iA2BBBC851C9C128D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22SPD-1.bmp%22%20title%3D%22SPD-1.bmp%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F58499i6270B0124B037A20%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22SPD-2.bmp%22%20title%3D%22SPD-2.bmp%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-48726%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20delete%20permission%20is%20required%20to%20rename%20a%20document%20in%20SP%20Document%20Library%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-48726%22%20slang%3D%22en-US%22%3EWork%20around%20(not%20pretty)%3CBR%20%2F%3E%3CBR%20%2F%3EAdd%20a%20metadata%20column%20for%20rename%20(checkbox)%20and%20column%20for%20the%20filename%20(single%20line).%20Use%20a%20SPD%20workflow%20with%20either%20an%20impersonation%20step%20(2010)%20or%20an%20app%20step%20(2013).%20On%20change%2C%20if%20checkbox%20is%20checked%20update%20item%20and%20rename.%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20isnt%20exact%20steps%2C%20but%20basically%20what%20you%20have%20to%20do.%3CBR%20%2F%3E%3CBR%20%2F%3EWe%20have%20a%20large%20example%20of%20this%20where%20delete%20had%20to%20be%20removed%20for%20Business%20reasons%2C%20which%20subsequently%20removed%20rename%20and%20move%20permissions.%20In%20our%20case%2C%20We%20built%20an%20app%20in%20NAPA%20that%20allowed%20users%20to%20browse%20the%20file%20structure%2C%20select%20a%20file%2C%20enter%20a%20new%20file%20name%20or%20select%20a%20destination%20folder%20and%20hit%20enter%2C%20which%20creates%20a%20new%20list%20item%20in%20a%20hidden%20list%2C%20and%20the%20workflow%20runs%20on%20that%20list%20item%20(spd%202013%20with%20app%20step%20and%20%22moveto%22%20api%20rest%20call%20to%20rename%20in%20place)%3CBR%20%2F%3E%3CBR%20%2F%3ELike%20I%20said%2C%20not%20elegant%20but%20effective%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46134%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20delete%20permission%20is%20required%20to%20rename%20a%20document%20in%20SP%20Document%20Library%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46134%22%20slang%3D%22en-US%22%3E%3CP%3EYeah%2C%20with%20a%20standard%20Contribute%20level%20sans%20Delete%2C%20the%20permissions%20mask%20isn't%20going%20to%20match%20what%20SharePoint%20is%20requesting%20to%20rename%20an%20item%20(0x28%20or%26nbsp%3BDeleteListItems%20%2B%26nbsp%3BOpenItems).%20This%20is%20identical%20to%20what%20would%20occur%20on%20a%20file%20system%20over%20CIFS%20or%20local%20(NTFS)%3B%20the%20operation%20is%20not%20a%20'rename'%2C%20but%20rather%20a%26nbsp%3B%3CEM%3Emove%3C%2FEM%3E%20operation.%20A%20move%2C%20of%20course%2C%20requires%20the%20ability%20to%26nbsp%3B%3CEM%3Edelete%3C%2FEM%3E%20the%20source%20file%20once%20the%20move%20has%20been%20confirmed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20as%20noted%20in%20the%20article%2C%20SharePoint%20acts%20similar%20to%20a%20file%20system%2C%20hence%20acting%20like%20an%20Windows%20Explorer%26nbsp%3B%3CEM%3Emove%3C%2FEM%3E%20operation.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-46058%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20delete%20permission%20is%20required%20to%20rename%20a%20document%20in%20SP%20Document%20Library%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46058%22%20slang%3D%22en-US%22%3EWhy%20not%20just%20create%20an%20%22extended%20Contributor%22%20permission%20level%20that%20includes%20the%20%22Delete%22%20individual%20permission%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-45905%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20delete%20permission%20is%20required%20to%20rename%20a%20document%20in%20SP%20Document%20Library%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-45905%22%20slang%3D%22en-US%22%3E%3CP%3ENot%20really%20an%20answer%20to%20your%20%22Why%3F%22%20question%2C%20but%20this%20is%20by%20design%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F2505742%2Fcontributor-users-are-not-able-to-rename-items-in-sharepoint-if-the-delete-permission-level-is-removed-from-the-contributors-group%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F2505742%2Fcontributor-users-are-not-able-to-rename-items-in-sharepoint-if-the-delete-permission-level-is-removed-from-the-contributors-group%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi,

 

We manage our controlled documents in SPO and for contributors we give only contribute without delete permissions. Now the problem is, due to this permission level they are not able to change the document name via Edit Properties. Why is it so and is there any workaround for this? Thanks.

 

-Prashant.

5 Replies
Why not just create an "extended Contributor" permission level that includes the "Delete" individual permission?
best response confirmed by Prashant Gupta (Contributor)
Solution

Yeah, with a standard Contribute level sans Delete, the permissions mask isn't going to match what SharePoint is requesting to rename an item (0x28 or DeleteListItems + OpenItems). This is identical to what would occur on a file system over CIFS or local (NTFS); the operation is not a 'rename', but rather a move operation. A move, of course, requires the ability to delete the source file once the move has been confirmed.

 

And as noted in the article, SharePoint acts similar to a file system, hence acting like an Windows Explorer move operation.

Work around (not pretty)

Add a metadata column for rename (checkbox) and column for the filename (single line). Use a SPD workflow with either an impersonation step (2010) or an app step (2013). On change, if checkbox is checked update item and rename.

This isnt exact steps, but basically what you have to do.

We have a large example of this where delete had to be removed for Business reasons, which subsequently removed rename and move permissions. In our case, We built an app in NAPA that allowed users to browse the file structure, select a file, enter a new file name or select a destination folder and hit enter, which creates a new list item in a hidden list, and the workflow runs on that list item (spd 2013 with app step and "moveto" api rest call to rename in place)

Like I said, not elegant but effective

Yes there is a work around to solve this problem which I've done already,

you can simply add the following javaScript to watch DOM changes in your master page, to remove delete option for (document, folder, workflow, etc...) .

I wrote this code to remove "delete" and also to deactivate delete action from Keyboard if document was selected and"delete" button was pressed, without disabling delete button from being used in the web page (ex. text boxes, text areas, etc..), and this can be done by overriding confirmation method "window.confirm".

The attached screen shots shows the output after editing master page and publishing.

You can add the following script directly under the <body> tag in your master page html.

 

<script type="text/javascript">//<![CDATA[


var mutationObserver = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
var objDelete = document.getElementById("ID_DeleteDocItem") || false;
var objDeleteItem = document.getElementById("ctl00_PlaceHolderMain_ctl00_ctl00_toolBarTbl_RptControls_diidIODeleteItem_LinkText") || false;
var objDeleteVersions = document.getElementById("ctl00_PlaceHolderMain_MngVersionToolBar_RptControls_diidDeleteVersions_LinkText") || false;
var objDeleteItem2 = document.getElementById("ID_DeleteItem") || false;
var objDeleteUserFromSCollection = document.getElementById("ctl00_PlaceHolderMain_UserListForm_ctl00_ctl00_ctl00_toolBarTbl_RptControls_diidIODeleteItem_LinkText") || false;

if(objDelete){
var firstParent = objDelete.parentNode;
firstParent.parentNode.removeChild(firstParent);
}

if(objDeleteItem) {
var firstParent = objDeleteItem.parentNode;
firstParent.parentNode.removeChild(firstParent);

}

if(objDeleteItem2) {
var firstParent = objDeleteItem2.parentNode;
firstParent.parentNode.removeChild(firstParent);
}

if(objDeleteVersions){
var firstParent = objDeleteVersions.parentNode;
firstParent.parentNode.removeChild(firstParent);
}
if(objDeleteUserFromSCollection) {
var firstParent = objDeleteUserFromSCollection.parentNode;
firstParent.parentNode.removeChild(firstParent);
}

});
});

mutationObserver.observe(document.documentElement, {
attributes: true,
characterData: true,
childList: true,
subtree: true,
attributeOldValue: true,
characterDataOldValue: true
});


window.confirm = function(message) {

if(message.indexOf("Recycle Bin?") != -1){

return false;

} else {

var responseConfirm = prompt(message, "Confirm");
if (responseConfirm != null) {
return true;
} else {
return false;
}
}
};
//]]>
</script>

SPD-1.bmpSPD-2.bmp