Sitecore security settings
Sitecore Powershell Extensions (SPE) to the rescue
function GetAssignedItems($path)
{
Write-Host "Start: " $path
$items = Get-ChildItem -Path $path -Recurse
$rootItem = Get-Item -Path $path
$items = $items + $rootItem
foreach ($item in $items)
{
$acl = Get-ItemAcl -Identity "MYROLE" -Item $item
if ($acl)
{
foreach ($rule in $acl)
{
"Add-ItemAcl -PropagationType " + $rule.PropagationType + " -SecurityPermission " + $rule.SecurityPermission + " -AccessRight '" + $rule.AccessRight +"' -Identity 'MYROLE' -Path '"+ $item.Paths.FullPath + "'"
}
}
}
Write-Host "Done."
}
GetAssignedItems "/sitecore/media library"
Just replace "myrole" with the name of your role and that's it. The call to the function takes the root you want to check.
Add-ItemAcl -PropagationType Entity -SecurityPermission AllowAccess -AccessRight 'item:read' -Identity 'MYROLE' -Path '/sitecore/media library/Project'
Add-ItemAcl -PropagationType Entity -SecurityPermission DenyInheritance -AccessRight '*' -Identity 'MYROLE' -Path '/sitecore/media library/Project'
You can do this for any database - just note that the database is not added to the result output.