Thursday, December 17, 2009

BreakRoleInheritance Method

Title: SPList.BreakRoleInheritance Method
Details: BreakRoleInheritance would break the inheritance ( can be used on a list / document library ) to alter permissions on the parent or itemlevel.

public void BreakRoleInheritance (
bool CopyRoleAssignments

Accepts either true / false as parameter that would decide whether or not to copy the existing groups / users and permissions.

One interesting concept to note. Instead of using the below code that would remove all the groups and permissions from an item or list level after breaking the inheritance.


we can simple use as below


No comments: