4

I'm struggling with library/folder permissions and I cant resolve one issue in sharepoint online.

I have a library, everybody can read and the owner can create folders. For each folder, the owner sets a title, breaks inheritance and let some users with contribute permissions.

Users will be able to create/upload/delete files and folder within this folder, but I don't want these users to edit folder name or delete it.

This is impossible to achieve with permissions or permission levels, I wonder if a cant manages this constraint with remote handler or policy. Any suggestion? Has anybody been in this situation before?

Thanks!

  • I respond my self with a trick that helps me: create a file with read permission only for admin inside the folder. This file is hidden for the users and prevent the folder being deleted. – sharePein Apr 8 '18 at 19:00
1

To achieve that without using remote handler or policy, an idea is that using Document Set instead of folder in the library and using JavaScript on the library view page to hide the Edit Properties and Delete Documents options under Files tab.

A Document Set is a group of related documents that you can manage as a single entity. User can also create/upload/delete files and folder within it.

Use F12 developer tools to find the id of the element and enter the following script in the Content Editor/ Script Editor web part on the page.

<style>
#<id>{display:none;}
</style>

enter image description here

  • Thanks for your answer, it may be an option, not very elegant but is an alternative way to resolve the problem. – sharePein Apr 8 '18 at 18:52
0

The most inelegant but simplest (albeit maybe not the most practical) solution is to simply have a double folder hierarchy, so the owner will create 'FolderA' and within that very same folder creates a new 'FolderA' at which level they break the inheritance. That way users could only manage to meddle with the second tier item but the file taxonomy will still be preserved.

Personally I would avoid folders as much as possible (unless it's absolutely necessary) and would rather just create a custom content type and a new library to replace each folder.

  • I have evaluated this option, but does not fit my requirements. Anyway, thank you for your answer! – sharePein Apr 8 '18 at 18:55

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.