I was trying to deny write access to Everyone role for my Sitecore Content tree nodes. There are many nodes and lot of items have write access for Everyone user , which we want to restrict now.
I tried using below scirpt , but it only works with the single item and not propagating to its children.
I used PropagationType as Any and Descendants both but it does not propagate to its child level. As a work around , I have to loop through the tree items and run the command.
$acl1 = New-ItemAcl -AccessRight write -PropagationType Any -SecurityPermission DenyAccess -Identity Everyone
Instead of this line
foreach($item in $items)
{
$item|Set-ItemAcl -AccessRules $acl1
}
I want to do
get-item -Path "master:content/My-Node/Home |Set-ItemAcl -AccessRules $acl1
to reflect the write access restriction to all the child items under Home.
I am not sure if it is a bug or I am doing it wrongly .. If you have come across this, your guidance would be helpful.
I used Sitecore 9.3 rev. 003498.