SPWeb.BreakRoleInheritance Method
Breaks inheritance of role assignments from the parent Web site.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
Public Sub BreakRoleInheritance ( _
CopyRoleAssignments As Boolean _
)
Dim instance As SPWeb
Dim CopyRoleAssignments As Boolean
instance.BreakRoleInheritance(CopyRoleAssignments)
public void BreakRoleInheritance(
bool CopyRoleAssignments
)
Parameters
- CopyRoleAssignments
Type: System.Boolean
true to break role inheritance but to copy the role assignments; otherwise, false to make the current user a Web site administrator.
Implements
ISecurableObject.BreakRoleInheritance(Boolean)
Remarks
If the current Web site is the root Web site in the site collection, the BreakRoleInheritance method throws an exception.