Skip to content

ResetRoleHinheritance affects child objects (clearSubScope seems to be ineffective) #1396

@jensotto

Description

@jensotto

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active worktype:bug-confirmedConfirmed bug, not working as designed / expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions