共用方式為


SPSecurableObject.BreakRoleInheritance Method (Boolean)

Creates unique role assignments for the object and optionally copies role assignments from the parent.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Overridable Sub BreakRoleInheritance ( _
    copyRoleAssignments As Boolean _
)
'Usage
Dim instance As SPSecurableObject
Dim copyRoleAssignments As Boolean

instance.BreakRoleInheritance(copyRoleAssignments)
public virtual void BreakRoleInheritance(
    bool copyRoleAssignments
)

Parameters

  • copyRoleAssignments
    Type: System.Boolean

    true to copy role assignments from the parent object to this object; false to assign only the current user to security roles.

Implements

ISecurableObject.BreakRoleInheritance(Boolean)

Remarks

This method calls the BreakRoleInheritance(Boolean, Boolean) method with copyRoleAssignments and false to stop inheriting role assignments from its parent object and to create unique role assignments for the securable object.

See Also

Reference

SPSecurableObject Class

SPSecurableObject Members

BreakRoleInheritance Overload

Microsoft.SharePoint Namespace

ResetRoleInheritance()