-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
calling web.ResetRoleInheritance() on a sub web should not reset role inheritance on child objects (sub webs, lists, files...)
Internally SharePoint makes a call to Microsoft.SharePoint.SPSecurableObjectImpl.RevertRoleInheritance(bool copyRoleAssignments, bool clearSubScopes) where clearSubScopes is set to false. It seems that the functionality is intended to not clear sub scopes, but it clears it anyway.
As a sidenote web.BreakRoleInheritance can be called with a parameter clearSubScopes. This seems to not have any effect and might be related to the ResetRoleInheritance bug.
Observed Behavior
calling web.ResetRoleInheritance() (or on any securable object) will reset role inheritance on all child objects.
Steps to Reproduce
Create a sub site in a site collection.
Break role inheritance on sub web. (UI or CSOM)
Create a list in the sub site.
Break role inheritance on the list. (UI or CSOM)
Reset role inheritance on the sub web (UI or CSOM).
Role inheritance is unexpectedly reset on the list in the sub site.
Tested on SP2013 and SP Online