SPListItem.BreakRoleInheritance method (Boolean, Boolean)

Creates unique role assignments for the list item, optionally copies role assignments from the parent, and optionally clears unique role assignments from descendants.

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

Syntax

'Declaration
Public Overrides Sub BreakRoleInheritance ( _
    copyRoleAssignments As Boolean, _
    clearSubscopes As Boolean _
)
'Usage
Dim instance As SPListItem
Dim copyRoleAssignments As Boolean
Dim clearSubscopes As Boolean

instance.BreakRoleInheritance(copyRoleAssignments, _
    clearSubscopes)
public override void BreakRoleInheritance(
    bool copyRoleAssignments,
    bool clearSubscopes
)

Parameters

  • copyRoleAssignments
    Type: System.Boolean

    If true, this method copies the role assignments of the parent securable object when breaking inheritance; otherwise, this method adds the current user to the permission level that is required to manage the list item.

  • clearSubscopes
    Type: System.Boolean

    Indicates whether subscopes should be cleared or not.

Remarks

This method breaks the role assignment inheritance for the list item, and creates unique role assignments for the list item with the copyRoleAssignments parameter which specifies whether to copy role assignments from the parent object and with the clearSubscopes parameter which specifies whether to clear role assignments from child objects.

This method calls the BreakRoleInheritance(Boolean, Boolean) method to create the new role assignments for the list item.

See also

Reference

SPListItem class

SPListItem members

BreakRoleInheritance overload

Microsoft.SharePoint namespace