SPSecurableObject.BreakRoleInheritance 方法 (Boolean, Boolean)

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

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Overridable Sub BreakRoleInheritance ( _
    copyRoleAssignments As Boolean, _
    clearSubscopes As Boolean _
)
用法
Dim instance As SPSecurableObject
Dim copyRoleAssignments As Boolean
Dim clearSubscopes As Boolean

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

参数

  • copyRoleAssignments
    类型:System.Boolean

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

  • clearSubscopes
    类型:System.Boolean

    true to clear the unique role assignments from child objects, which in turn inherit role assignments from this object; false to keep the unique role assignments defined on child objects in place.

备注

This method replaces the default role assignments that the securable object inherits from its parent object with unique role assignments.

另请参阅

引用

SPSecurableObject 类

SPSecurableObject 成员

BreakRoleInheritance 重载

Microsoft.SharePoint 命名空间

ResetRoleInheritance()