Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Server Technologies
SDK Documentation
SPList Class
SPList Methods
 BreakRoleInheritance Method
SPList.BreakRoleInheritance Method (Microsoft.SharePoint)
Breaks the role assignment inheritance for the list and gives the current list its own copy of the role assignments.

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

Visual Basic (Declaration)
Public Sub BreakRoleInheritance ( _
    CopyRoleAssignments As Boolean _
)
Visual Basic (Usage)
Dim instance As SPList
Dim CopyRoleAssignments As Boolean

instance.BreakRoleInheritance(CopyRoleAssignments)
C#
public void BreakRoleInheritance (
    bool CopyRoleAssignments
)

Parameters

CopyRoleAssignments

true to copy the role assignments of the parent Web site when breaking inheritance; false to add the current user to the permission level that is required to manage the list.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Requires disposing SPWeb      austegard   |   Edit   |  

Per Roger Lamb:

"When using the SPList.BreakRoleInheritance() method a internal call to ParentWeb property is called and must be disposed by the caller. Note that SPListItem.BreakRoleInheritance() and SPWeb.BreakRoleInheritance() DO NOT require a call to Dispose."

http://blogs.msdn.com/rogerla/archive/2008/04/11/splist-breakroleinheritance-method-requires-dispose-on-parentweb-property.aspx

Flag as ContentBug
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker