SPWeb.ResetRoleInheritance Method
Resets the local role assignments and inherits role assignments from the parent website.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
<ClientCallableAttribute> _
<ClientCallableExceptionConstraintAttribute(FixedId := "Microsoft.SharePoint.SPException$-2146232832", _
ErrorType := GetType(SPException), Condition := "This site is a root site.", _
ErrorCode := )> _
<ClientCallableExceptionConstraintAttribute(FixedId := "b", ErrorType := GetType(InvalidOperationException), _
Condition := "There are uncommitted changes on the site", ErrorCode := )> _
Public Overrides Sub ResetRoleInheritance
'Usage
Dim instance As SPWeb
instance.ResetRoleInheritance()
[ClientCallableAttribute]
[ClientCallableExceptionConstraintAttribute(FixedId = "Microsoft.SharePoint.SPException$-2146232832",
ErrorType = typeof(SPException), Condition = "This site is a root site.",
ErrorCode = )]
[ClientCallableExceptionConstraintAttribute(FixedId = "b", ErrorType = typeof(InvalidOperationException),
Condition = "There are uncommitted changes on the site", ErrorCode = )]
public override void ResetRoleInheritance()
Implements
ISecurableObject.ResetRoleInheritance()
Exceptions
Exception | Condition |
---|---|
SPException | The current website is the root website. |
Remarks
This method resets the role inheritance for the website so it inherits the role assignments from the parent website.