security-set-item-acl
Set access rules on a Sitecore item by adding, replacing, or clearing permissions for a chosen account and access right.
Instructions
Changes the access rules on a Sitecore item. action 'add' appends one rule and leaves the others; 'replace' discards every existing rule on the item and leaves only this one; 'clear' removes all rules and adds nothing. Read the current rules with security-get-item-acl and check effective rights with security-test-item-acl.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The ID of the item. Supply this or path. | |
| full | No | Return the unprojected .NET object graph. Very large (100,000+ chars/item); diagnostics only. | |
| path | No | The path of the item (e.g. /sitecore/content/Home). Supply this or id. | |
| action | Yes | add appends a rule; replace discards all existing rules and leaves only this one; clear removes all rules. | |
| fields | No | Extra Sitecore field names to include, e.g. ['Title']. Ignored when full is true. | |
| database | No | Database to resolve an id against (default master). | master |
| identity | No | The account the rule applies to, e.g. 'sitecore\Author'. Required for add and replace; not allowed for clear. | |
| passThru | No | Return the processed item, projected to its identity. | |
| accessRight | No | The access right the rule covers, e.g. 'item:read'. Required for add and replace; not allowed for clear. | |
| propagationType | No | How far the rule propagates: Entity is this item only, Descendants the whole subtree. Sitecore has no children-only propagation. | Entity |
| securityPermission | No | Whether the rule allows or denies the right, or allows/denies inheritance of it. | AllowAccess |