by walkingstar at 2012-08-20 14:16:58
How to check if SharePoint List inherits permissions from its Parent site?by poshoholic at 2012-08-20 14:32:57
I know to BreakRoleInhertance() or to ResetRoleInheritance() to break /reset permissions from the Parent site.
However, how do we check if the list inherits permissions in the first place?
Thanks,
Venky.
I just moved this question over to the PowerShell and SharePoint forum so that it gets the attention of the appropriate subject matter experts for SharePoint and PowerShell. They should be able to help you out better over there.by ToddKlindt at 2012-08-21 20:59:44
Here’s how I found the answer to this one:by iwkid at 2012-09-11 06:54:20
[script=powershell]$web = get-spweb http://team.contoso.com
$list = $web.lists["Announcements"]
$list | get-member | where-object { $.name -like "role" }[/script]
I got this list of methods and properties:
[script=powershell]PS C:> $list | Get-Member | Where-Object { $.name -like "role" }
TypeName: Microsoft.SharePoint.SPDocumentLibrary
Name MemberType Definition
---- ---------- ----------
BreakRoleInheritance Method System.Void BreakRoleInheritance(bool co…
ResetRoleInheritance Method System.Void ResetRoleInheritance()
AllRolesForCurrentUser Property Microsoft.SharePoint.SPRoleDefinitionBin…
HasUniqueRoleAssignments Property System.Boolean HasUniqueRoleAssignments …
RoleAssignments Property Microsoft.SharePoint.SPRoleAssignmentCol…[/script]
Looks like HasUniqueRoleAssignments is what you’re looking for.
tk
More info on the HasUiniqueRoleAssignments property can be found here on MSDN: http://msdn.microsoft.com/en-us/library … ments.aspx