This documentation is archived and is not being maintained.

SPWeb.BreakRoleInheritance Method

Windows SharePoint Services 3

Breaks inheritance of role assignments from the parent Web site.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

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)

If the current Web site is the root Web site in the site collection, the BreakRoleInheritance method throws an exception.

Show: