0

In a Nutshell: How do I Prevent (Not break) User / Group Inheritance by default, when a new Document Library Folder is Created?

Breakdown: I have a Document Library that Creates Folders via Email. I send an Email (with the Subject line as Folder Name). when the Folder is created, it Inherits ALL the Users and Groups by default...

Question: How can I prevent this from happening?

Thanks

  • How would the folder created? Using SharePoint Designer workflow or code? – users1100 Jan 25 '16 at 11:02
  • Via Email as stated above in the Breakdown! – RaveWolf Jan 25 '16 at 13:14
0

If you are breaking the permission, then you need to assign unique permission to the folder, When you are creating the folder, take the folder object and use this folder.BreakRoleInheritance(false, true);... This will break the inheritance of the folder, now you have to define a role and do the role binding to the folder.

  • As mentioned above... I am not asking about Breaking Inheritance once the folder is created... I am asking about Preventing it from inheriting the permissions when the folder is created. Please also note that the folder is being created from automated Emails. – RaveWolf Jan 25 '16 at 13:20
  • Any object you are creating inside a SharePoint list/folder/site will inherit permission of its parent. If the folder is getting created, there will be some permission assigned to it which, by default, is the permission of the parent item. So... coming to your query....if you are preventing the folder from inheriting the permission is in other word you are not allowing to inherit the permission of parent...i.e. you are breaking the inheritance...Hope its clear now.....you can remove the permission by calling RemoveAll() for roledefinitionbindingcollection. – Ankit Kumar Jan 25 '16 at 13:34
  • Thank you, yes I do understand and it's always been clear... However there is code in PowerShell, that only gives the creator of the folder access. I was hoping there was a way to Enable or Disable Automatic Inheritance. Folders don't need a user to be assigned in order to exist. A folder can exist without any permissions... I simply find SharePoint illogical in the fact that it provides everyone access. It's like creating a shared folder in Windows, and giving 10,000 users full access by default. and only then removing access one by one, when you only need to 1,000 users access! Lol – RaveWolf Jan 25 '16 at 14:00

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.