@antonytm/mcp-sitecore-server 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/bundle.js +106 -12
- package/dist/register.js +7 -0
- package/dist/register.js.map +1 -1
- package/dist/tools/powershell/documentation/add-basetemplate.md +137 -0
- package/dist/tools/powershell/documentation/add-itemacl.md +254 -0
- package/dist/tools/powershell/documentation/add-itemversion.md +231 -0
- package/dist/tools/powershell/documentation/add-placeholdersetting.md +410 -0
- package/dist/tools/powershell/documentation/add-rendering.md +217 -0
- package/dist/tools/powershell/documentation/add-rolemember.md +88 -0
- package/dist/tools/powershell/documentation/clear-itemacl.md +131 -0
- package/dist/tools/powershell/documentation/close-window.md +32 -0
- package/dist/tools/powershell/documentation/commands-list.md +134 -0
- package/dist/tools/powershell/documentation/convertfrom-clixml.md +67 -0
- package/dist/tools/powershell/documentation/convertfrom-itemclone.md +118 -0
- package/dist/tools/powershell/documentation/convertto-clixml.md +66 -0
- package/dist/tools/powershell/documentation/disable-user.md +89 -0
- package/dist/tools/powershell/documentation/enable-user.md +89 -0
- package/dist/tools/powershell/documentation/expand-token.md +144 -0
- package/dist/tools/powershell/documentation/export-item.md +165 -0
- package/dist/tools/powershell/documentation/export-package.md +129 -0
- package/dist/tools/powershell/documentation/export-role.md +150 -0
- package/dist/tools/powershell/documentation/export-updatepackage.md +111 -0
- package/dist/tools/powershell/documentation/export-user.md +147 -0
- package/dist/tools/powershell/documentation/find-item.md +718 -0
- package/dist/tools/powershell/documentation/get-archive.md +73 -0
- package/dist/tools/powershell/documentation/get-archiveitem.md +138 -0
- package/dist/tools/powershell/documentation/get-cache.md +62 -0
- package/dist/tools/powershell/documentation/get-database.md +96 -0
- package/dist/tools/powershell/documentation/get-domain.md +75 -0
- package/dist/tools/powershell/documentation/get-item.md +186 -0
- package/dist/tools/powershell/documentation/get-itemacl.md +168 -0
- package/dist/tools/powershell/documentation/get-itemclone.md +100 -0
- package/dist/tools/powershell/documentation/get-itemclonenotification.md +95 -0
- package/dist/tools/powershell/documentation/get-itemfield.md +182 -0
- package/dist/tools/powershell/documentation/get-itemreference.md +152 -0
- package/dist/tools/powershell/documentation/get-itemreferrer.md +154 -0
- package/dist/tools/powershell/documentation/get-itemtemplate.md +152 -0
- package/dist/tools/powershell/documentation/get-itemworkflowevent.md +133 -0
- package/dist/tools/powershell/documentation/get-layout.md +142 -0
- package/dist/tools/powershell/documentation/get-layoutdevice.md +97 -0
- package/dist/tools/powershell/documentation/get-package.md +63 -0
- package/dist/tools/powershell/documentation/get-placeholdersetting.md +477 -0
- package/dist/tools/powershell/documentation/get-preset.md +70 -0
- package/dist/tools/powershell/documentation/get-rendering.md +248 -0
- package/dist/tools/powershell/documentation/get-renderingparameter.md +84 -0
- package/dist/tools/powershell/documentation/get-role.md +134 -0
- package/dist/tools/powershell/documentation/get-rolemember.md +131 -0
- package/dist/tools/powershell/documentation/get-scriptsession.md +128 -0
- package/dist/tools/powershell/documentation/get-searchindex.md +92 -0
- package/dist/tools/powershell/documentation/get-session.md +107 -0
- package/dist/tools/powershell/documentation/get-sitecorejob.md +102 -0
- package/dist/tools/powershell/documentation/get-spemodule.md +134 -0
- package/dist/tools/powershell/documentation/get-spemodulefeatureroot.md +113 -0
- package/dist/tools/powershell/documentation/get-taskschedule.md +136 -0
- package/dist/tools/powershell/documentation/get-updatepackagediff.md +110 -0
- package/dist/tools/powershell/documentation/get-user.md +193 -0
- package/dist/tools/powershell/documentation/get-useragent.md +38 -0
- package/dist/tools/powershell/documentation/import-function.md +83 -0
- package/dist/tools/powershell/documentation/import-item-1.md +180 -0
- package/dist/tools/powershell/documentation/import-item.md +180 -0
- package/dist/tools/powershell/documentation/import-role.md +137 -0
- package/dist/tools/powershell/documentation/import-user.md +137 -0
- package/dist/tools/powershell/documentation/initialize-item.md +87 -0
- package/dist/tools/powershell/documentation/initialize-searchindex.md +116 -0
- package/dist/tools/powershell/documentation/initialize-searchindexitem.md +85 -0
- package/dist/tools/powershell/documentation/install-package.md +95 -0
- package/dist/tools/powershell/documentation/install-updatepackage.md +90 -0
- package/dist/tools/powershell/documentation/invoke-javascript.md +22 -0
- package/dist/tools/powershell/documentation/invoke-script.md +111 -0
- package/dist/tools/powershell/documentation/invoke-shellcommand.md +144 -0
- package/dist/tools/powershell/documentation/invoke-workflow.md +142 -0
- package/dist/tools/powershell/documentation/lock-item.md +157 -0
- package/dist/tools/powershell/documentation/login-user.md +56 -0
- package/dist/tools/powershell/documentation/logout-user.md +30 -0
- package/dist/tools/powershell/documentation/merge-layout.md +102 -0
- package/dist/tools/powershell/documentation/new-domain.md +72 -0
- package/dist/tools/powershell/documentation/new-explicitfilesource.md +104 -0
- package/dist/tools/powershell/documentation/new-explicititemsource.md +146 -0
- package/dist/tools/powershell/documentation/new-filesource.md +128 -0
- package/dist/tools/powershell/documentation/new-itemacl.md +175 -0
- package/dist/tools/powershell/documentation/new-itemclone.md +139 -0
- package/dist/tools/powershell/documentation/new-itemsource.md +171 -0
- package/dist/tools/powershell/documentation/new-itemworkflowevent.md +140 -0
- package/dist/tools/powershell/documentation/new-package.md +81 -0
- package/dist/tools/powershell/documentation/new-placeholdersetting.md +255 -0
- package/dist/tools/powershell/documentation/new-rendering.md +243 -0
- package/dist/tools/powershell/documentation/new-role.md +56 -0
- package/dist/tools/powershell/documentation/new-securitysource.md +176 -0
- package/dist/tools/powershell/documentation/new-user.md +161 -0
- package/dist/tools/powershell/documentation/new-usingblock.md +95 -0
- package/dist/tools/powershell/documentation/out-download.md +123 -0
- package/dist/tools/powershell/documentation/protect-item.md +120 -0
- package/dist/tools/powershell/documentation/publish-item.md +224 -0
- package/dist/tools/powershell/documentation/read-variable.md +252 -0
- package/dist/tools/powershell/documentation/receive-file.md +244 -0
- package/dist/tools/powershell/documentation/receive-itemclonenotification.md +116 -0
- package/dist/tools/powershell/documentation/receive-scriptsession.md +108 -0
- package/dist/tools/powershell/documentation/remove-archiveitem.md +125 -0
- package/dist/tools/powershell/documentation/remove-basetemplate.md +137 -0
- package/dist/tools/powershell/documentation/remove-domain.md +70 -0
- package/dist/tools/powershell/documentation/remove-itemversion.md +209 -0
- package/dist/tools/powershell/documentation/remove-layout.md +151 -0
- package/dist/tools/powershell/documentation/remove-placeholdersetting.md +478 -0
- package/dist/tools/powershell/documentation/remove-rendering.md +253 -0
- package/dist/tools/powershell/documentation/remove-renderingparameter.md +83 -0
- package/dist/tools/powershell/documentation/remove-role.md +70 -0
- package/dist/tools/powershell/documentation/remove-rolemember.md +79 -0
- package/dist/tools/powershell/documentation/remove-scriptsession.md +72 -0
- package/dist/tools/powershell/documentation/remove-searchindexitem.md +79 -0
- package/dist/tools/powershell/documentation/remove-session.md +77 -0
- package/dist/tools/powershell/documentation/remove-user.md +97 -0
- package/dist/tools/powershell/documentation/reset-itemfield.md +149 -0
- package/dist/tools/powershell/documentation/reset-layout.md +130 -0
- package/dist/tools/powershell/documentation/restart-application.md +30 -0
- package/dist/tools/powershell/documentation/restore-archiveitem.md +126 -0
- package/dist/tools/powershell/documentation/resume-searchindex.md +84 -0
- package/dist/tools/powershell/documentation/send-file.md +160 -0
- package/dist/tools/powershell/documentation/send-sheermessage.md +66 -0
- package/dist/tools/powershell/documentation/set-hostproperty.md +90 -0
- package/dist/tools/powershell/documentation/set-itemacl.md +158 -0
- package/dist/tools/powershell/documentation/set-itemtemplate.md +156 -0
- package/dist/tools/powershell/documentation/set-layout.md +166 -0
- package/dist/tools/powershell/documentation/set-rendering.md +213 -0
- package/dist/tools/powershell/documentation/set-renderingparameter.md +97 -0
- package/dist/tools/powershell/documentation/set-user.md +221 -0
- package/dist/tools/powershell/documentation/set-userpassword.md +109 -0
- package/dist/tools/powershell/documentation/show-alert.md +53 -0
- package/dist/tools/powershell/documentation/show-application.md +150 -0
- package/dist/tools/powershell/documentation/show-confirm.md +61 -0
- package/dist/tools/powershell/documentation/show-fieldeditor.md +231 -0
- package/dist/tools/powershell/documentation/show-input.md +129 -0
- package/dist/tools/powershell/documentation/show-listview.md +276 -0
- package/dist/tools/powershell/documentation/show-modaldialog.md +137 -0
- package/dist/tools/powershell/documentation/show-result.md +158 -0
- package/dist/tools/powershell/documentation/show-yesnocancel.md +92 -0
- package/dist/tools/powershell/documentation/start-scriptsession.md +230 -0
- package/dist/tools/powershell/documentation/start-taskschedule.md +124 -0
- package/dist/tools/powershell/documentation/stop-scriptsession.md +78 -0
- package/dist/tools/powershell/documentation/stop-searchindex.md +84 -0
- package/dist/tools/powershell/documentation/suspend-searchindex.md +84 -0
- package/dist/tools/powershell/documentation/switch-rendering.md +248 -0
- package/dist/tools/powershell/documentation/test-account.md +74 -0
- package/dist/tools/powershell/documentation/test-basetemplate.md +97 -0
- package/dist/tools/powershell/documentation/test-itemacl.md +182 -0
- package/dist/tools/powershell/documentation/test-rule.md +111 -0
- package/dist/tools/powershell/documentation/unlock-item.md +124 -0
- package/dist/tools/powershell/documentation/unlock-user.md +84 -0
- package/dist/tools/powershell/documentation/unprotect-item.md +124 -0
- package/dist/tools/powershell/documentation/update-itemreferrer.md +234 -0
- package/dist/tools/powershell/documentation/update-listview.md +139 -0
- package/dist/tools/powershell/documentation/update-searchindexitem.md +79 -0
- package/dist/tools/powershell/documentation/wait-scriptsession.md +100 -0
- package/dist/tools/powershell/documentation/write-log.md +82 -0
- package/dist/tools/powershell/get-powershell-documentation.d.ts +2 -0
- package/dist/tools/powershell/get-powershell-documentation.js +47 -0
- package/dist/tools/powershell/get-powershell-documentation.js.map +1 -0
- package/dist/tools/powershell/run-powershell-script.d.ts +3 -0
- package/dist/tools/powershell/run-powershell-script.js +13 -0
- package/dist/tools/powershell/run-powershell-script.js.map +1 -0
- package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.d.ts +3 -0
- package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.js +24 -0
- package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.js.map +1 -0
- package/dist/tools/sitecore-cli/sitecore-cli-documentation.md +70 -0
- package/package.json +8 -8
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# Add-ItemAcl
|
|
2
|
+
|
|
3
|
+
Adds new access rule to an item allowing for the item to have the access granted or denied for a provided role or user.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
Add-ItemAcl -PropagationType <Unknown | Descendants | Entity | Any> -SecurityPermission <NotSet | AllowAccess | DenyAccess | AllowInheritance | DenyInheritance> -AccessRight <String> -Identity <AccountIdentity> -Path <String> [-PassThru]
|
|
9
|
+
Add-ItemAcl -PropagationType <Unknown | Descendants | Entity | Any> -SecurityPermission <NotSet | AllowAccess | DenyAccess | AllowInheritance | DenyInheritance> -AccessRight <String> -Identity <AccountIdentity> -Id <String> [-Database <String>] [-PassThru]
|
|
10
|
+
Add-ItemAcl -PropagationType <Unknown | Descendants | Entity | Any> -SecurityPermission <NotSet | AllowAccess | DenyAccess | AllowInheritance | DenyInheritance> -AccessRight <String> -Identity <AccountIdentity> -Item <Item> [-PassThru]
|
|
11
|
+
Add-ItemAcl -AccessRules <AccessRuleCollection> -Path <String> [-PassThru]
|
|
12
|
+
Add-ItemAcl -AccessRules <AccessRuleCollection> -Id <String> [-PassThru]
|
|
13
|
+
Add-ItemAcl -AccessRules <AccessRuleCollection> -Item <Item> [-PassThru]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Detailed Description
|
|
17
|
+
|
|
18
|
+
Adds new access rule to an item allowing for the item to have the access granted or denied for a provided role or user. The new rules will be appended to the existing security descriptors on the item.
|
|
19
|
+
|
|
20
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
21
|
+
|
|
22
|
+
## Parameters
|
|
23
|
+
|
|
24
|
+
### -PropagationType <PropagationType>
|
|
25
|
+
|
|
26
|
+
The PropagationType enumeration determines which items will be granted the access right.
|
|
27
|
+
|
|
28
|
+
* Any - the item and all items inheriting
|
|
29
|
+
* Descendants - applies rights to inheriting children only
|
|
30
|
+
* Entity - applies right to the item only
|
|
31
|
+
|
|
32
|
+
| Aliases | |
|
|
33
|
+
| :--- | :--- |
|
|
34
|
+
| Required? | true |
|
|
35
|
+
| Position? | named |
|
|
36
|
+
| Default Value | |
|
|
37
|
+
| Accept Pipeline Input? | false |
|
|
38
|
+
| Accept Wildcard Characters? | false |
|
|
39
|
+
|
|
40
|
+
### -SecurityPermission <SecurityPermission>
|
|
41
|
+
|
|
42
|
+
The SecurityPermission determines whether to grant \(allow\) or deny the access right, and deny or allow inheritance of the right.
|
|
43
|
+
|
|
44
|
+
* AllowAccess -
|
|
45
|
+
* DenyAccess -
|
|
46
|
+
* AllowInheritance -
|
|
47
|
+
* DenyInheritance -
|
|
48
|
+
|
|
49
|
+
| Aliases | |
|
|
50
|
+
| :--- | :--- |
|
|
51
|
+
| Required? | true |
|
|
52
|
+
| Position? | named |
|
|
53
|
+
| Default Value | |
|
|
54
|
+
| Accept Pipeline Input? | false |
|
|
55
|
+
| Accept Wildcard Characters? | false |
|
|
56
|
+
|
|
57
|
+
### -AccessRules <AccessRuleCollection>
|
|
58
|
+
|
|
59
|
+
A single or multiple access rules created e.g. through the New-ItemAcl or obtained from other item using the Get-ItemAcl cmdlet. This information will be appended to the existing security descriptors on the item.
|
|
60
|
+
|
|
61
|
+
| Aliases | |
|
|
62
|
+
| :--- | :--- |
|
|
63
|
+
| Required? | true |
|
|
64
|
+
| Position? | named |
|
|
65
|
+
| Default Value | |
|
|
66
|
+
| Accept Pipeline Input? | false |
|
|
67
|
+
| Accept Wildcard Characters? | false |
|
|
68
|
+
|
|
69
|
+
### -PassThru <SwitchParameter>
|
|
70
|
+
|
|
71
|
+
| Aliases | |
|
|
72
|
+
| :--- | :--- |
|
|
73
|
+
| Required? | false |
|
|
74
|
+
| Position? | named |
|
|
75
|
+
| Default Value | |
|
|
76
|
+
| Accept Pipeline Input? | false |
|
|
77
|
+
| Accept Wildcard Characters? | false |
|
|
78
|
+
|
|
79
|
+
### -AccessRight <String>
|
|
80
|
+
|
|
81
|
+
The access right to grand or deny. Well known rights are:
|
|
82
|
+
|
|
83
|
+
* field:read - "Field Read" - controls whether an account can read a specific field on an item..
|
|
84
|
+
* field:write - "Field Write" - controls whether an account can update a specific field on an item.
|
|
85
|
+
* item:read - "Read" - controls whether an account can see an item in the content tree and/or on the published Web site, including all of its properties and field values.
|
|
86
|
+
* item:write - "Write" - controls whether an account can update field values. The write access right requires the read access right and field read and field write access rights for individual fields \(field read and field write are allowed by default\).
|
|
87
|
+
* item:rename - "Rename" - controls whether an account can change the name of an item. The rename access right requires the read access right.
|
|
88
|
+
* item:create - "Create" - controls whether an account can create child items. The create access right requires the read access right.
|
|
89
|
+
* item:delete - "Delete" - Delete right for items. controls whether an account can delete an item. The delete access right requires the read access right
|
|
90
|
+
|
|
91
|
+
Important!
|
|
92
|
+
|
|
93
|
+
The Delete command also deletes all child items, even if the account has been denied Delete
|
|
94
|
+
|
|
95
|
+
rights for one or more of the subitems.
|
|
96
|
+
|
|
97
|
+
* item:admin - "Administer" - controls whether an account can configure access rights on an item. The administer access right requires the read and write access rights.
|
|
98
|
+
* language:read - "Language Read" - controls whether a user can read a specific language version of items.
|
|
99
|
+
* language:write - "Language Write" - controls whether a user can update a specific language version of items.
|
|
100
|
+
* site:enter - controls whether a user can access a specific site.
|
|
101
|
+
* insert:show - "Show in Insert" - Determines if the user can see the insert option
|
|
102
|
+
* workflowState:delete - "Workflow State Delete" - controls whether a user can delete items which are currently associated with a specific workflow state.
|
|
103
|
+
* workflowState:write - "Workflow State Write" - controls whether a user can update items which are currently associated with a specific workflow state.
|
|
104
|
+
* workflowCommand:execute - "Workflow Command Execute" - — controls whether a user is shown specific workflow commands.
|
|
105
|
+
* profile:customize - "Customize Profile Key Values" - The right to input out of range values of profile keys, that belong to this profile.
|
|
106
|
+
* bucket:makebucket - "Create Bucket" - convert item to bucket.
|
|
107
|
+
* bucket:unmake - "Revert Bucket" - convert item back from bucket.
|
|
108
|
+
* remote:fieldread - "Field Remote Read" - Field Read right for remoted clients.
|
|
109
|
+
|
|
110
|
+
| Aliases | |
|
|
111
|
+
| :--- | :--- |
|
|
112
|
+
| Required? | true |
|
|
113
|
+
| Position? | named |
|
|
114
|
+
| Default Value | |
|
|
115
|
+
| Accept Pipeline Input? | false |
|
|
116
|
+
| Accept Wildcard Characters? | false |
|
|
117
|
+
|
|
118
|
+
### -Identity <AccountIdentity>
|
|
119
|
+
|
|
120
|
+
User name including domain for which the access rule is being created. If no domain is specified - 'sitecore' will be used as the default domain.
|
|
121
|
+
|
|
122
|
+
Specifies the Sitecore user by providing one of the following values.
|
|
123
|
+
|
|
124
|
+
```powershell
|
|
125
|
+
Local Name
|
|
126
|
+
Example: adam
|
|
127
|
+
Fully Qualified Name
|
|
128
|
+
Example: sitecore\adam
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
| Aliases | |
|
|
132
|
+
| :--- | :--- |
|
|
133
|
+
| Required? | true |
|
|
134
|
+
| Position? | named |
|
|
135
|
+
| Default Value | |
|
|
136
|
+
| Accept Pipeline Input? | false |
|
|
137
|
+
| Accept Wildcard Characters? | false |
|
|
138
|
+
|
|
139
|
+
### -Item <Item>
|
|
140
|
+
|
|
141
|
+
The item to be processed.
|
|
142
|
+
|
|
143
|
+
| Aliases | |
|
|
144
|
+
| :--- | :--- |
|
|
145
|
+
| Required? | true |
|
|
146
|
+
| Position? | named |
|
|
147
|
+
| Default Value | |
|
|
148
|
+
| Accept Pipeline Input? | true \(ByValue\) |
|
|
149
|
+
| Accept Wildcard Characters? | false |
|
|
150
|
+
|
|
151
|
+
### -Path <String>
|
|
152
|
+
|
|
153
|
+
Path to the item to be processed.
|
|
154
|
+
|
|
155
|
+
| Aliases | |
|
|
156
|
+
| :--- | :--- |
|
|
157
|
+
| Required? | true |
|
|
158
|
+
| Position? | named |
|
|
159
|
+
| Default Value | |
|
|
160
|
+
| Accept Pipeline Input? | false |
|
|
161
|
+
| Accept Wildcard Characters? | false |
|
|
162
|
+
|
|
163
|
+
### -Id <String>
|
|
164
|
+
|
|
165
|
+
Id of the item to be processed. Requires Database parameter to be specified
|
|
166
|
+
|
|
167
|
+
| Aliases | |
|
|
168
|
+
| :--- | :--- |
|
|
169
|
+
| Required? | true |
|
|
170
|
+
| Position? | named |
|
|
171
|
+
| Default Value | |
|
|
172
|
+
| Accept Pipeline Input? | false |
|
|
173
|
+
| Accept Wildcard Characters? | false |
|
|
174
|
+
|
|
175
|
+
### -Database <String>
|
|
176
|
+
|
|
177
|
+
Database containing the item to be fetched using the Id Parameter.
|
|
178
|
+
|
|
179
|
+
| Aliases | |
|
|
180
|
+
| :--- | :--- |
|
|
181
|
+
| Required? | false |
|
|
182
|
+
| Position? | named |
|
|
183
|
+
| Default Value | |
|
|
184
|
+
| Accept Pipeline Input? | false |
|
|
185
|
+
| Accept Wildcard Characters? | false |
|
|
186
|
+
|
|
187
|
+
## Inputs
|
|
188
|
+
|
|
189
|
+
The input type is the type of the objects that you can pipe to the cmdlet.
|
|
190
|
+
|
|
191
|
+
* can be piped from another cmdlet\* Sitecore.Data.Items.Item
|
|
192
|
+
|
|
193
|
+
## Outputs
|
|
194
|
+
|
|
195
|
+
The output type is the type of the objects that the cmdlet emits.
|
|
196
|
+
|
|
197
|
+
* Only if -PassThru is used\* Sitecore.Data.Items.Item
|
|
198
|
+
|
|
199
|
+
## Notes
|
|
200
|
+
|
|
201
|
+
Help Author: Adam Najmanowicz, Michael West
|
|
202
|
+
|
|
203
|
+
## Examples
|
|
204
|
+
|
|
205
|
+
### EXAMPLE 1
|
|
206
|
+
|
|
207
|
+
allows the "sitecore\adam" user to rename the Home item and all of its childre
|
|
208
|
+
|
|
209
|
+
```powershell
|
|
210
|
+
PS master:\> Add-ItemAcl -Path master:\content\Home -AccessRight "item:rename" -PropagationType Any -SecurityPermission AllowAccess -Identity "sitecore\admin"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### EXAMPLE 2
|
|
214
|
+
|
|
215
|
+
Allows the "sitecore\adam" user to delete the Home item and all of its children. Denies the "sitecore\mikey" user reading the descendants of the Home item. ;P The security info is created prior to adding it to the item. The item is delivered to the Add-ItemAcl from the pipeline and returned to the pipeline after processing due to the -PassThru parameter.
|
|
216
|
+
|
|
217
|
+
```powershell
|
|
218
|
+
$acl1 = New-ItemAcl -AccessRight item:delete -PropagationType Any -SecurityPermission AllowAccess -Identity "sitecore\admin"
|
|
219
|
+
$acl2 = New-ItemAcl -AccessRight item:read -PropagationType Descendants -SecurityPermission DenyAccess -Identity "sitecore\mikey"
|
|
220
|
+
Get-Item -Path master:\content\home | Add-ItemAcl -AccessRules $acl1, $acl2 -PassThru
|
|
221
|
+
|
|
222
|
+
Name Children Languages Id TemplateName
|
|
223
|
+
---- -------- --------- -- ------------
|
|
224
|
+
Home False {en, ja-JP, de-DE, da} {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9} Sample Item
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### EXAMPLE 3
|
|
228
|
+
|
|
229
|
+
The following demonstrates how to add several AccessRule to an item when the PropogationType and SecurityPermission are the same.
|
|
230
|
+
|
|
231
|
+
```powershell
|
|
232
|
+
$item = Get-Item -Path master:\content\youritem
|
|
233
|
+
$role = "sitecore\role"
|
|
234
|
+
$rights = @("item:create", "item:write", "item:rename", "item:delete")
|
|
235
|
+
|
|
236
|
+
$item | Clear-ItemAcl
|
|
237
|
+
$rights | ForEach-Object { Add-ItemAcl -Item $item -AccessRight $_ -PropagationType Any -SecurityPermission AllowAccess -Identity $role }
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Related Topics
|
|
241
|
+
|
|
242
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
243
|
+
* [Add-ItemAcl](add-itemacl.md)
|
|
244
|
+
* [Clear-ItemAcl](clear-itemacl.md)
|
|
245
|
+
* [Get-ItemAcl](get-itemacl.md)
|
|
246
|
+
* [New-ItemAcl](new-itemacl.md)
|
|
247
|
+
* [Set-ItemAcl](set-itemacl.md)
|
|
248
|
+
* [Test-ItemAcl](test-itemacl.md)
|
|
249
|
+
* [https://sdn.sitecore.net/upload/sitecore6/security\_administrators\_cookbook\_a4.pdf](https://sdn.sitecore.net/upload/sitecore6/security_administrators_cookbook_a4.pdf)
|
|
250
|
+
* [https://sdn.sitecore.net/upload/sitecore6/61/security\_reference-a4.pdf](https://sdn.sitecore.net/upload/sitecore6/61/security_reference-a4.pdf)
|
|
251
|
+
* [https://sdn.sitecore.net/upload/sitecore6/64/content\_api\_cookbook\_sc64\_and\_later-a4.pdf](https://sdn.sitecore.net/upload/sitecore6/64/content_api_cookbook_sc64_and_later-a4.pdf)
|
|
252
|
+
* [https://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2013/01/sitecore-security-access-rights.aspx](https://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2013/01/sitecore-security-access-rights.aspx)
|
|
253
|
+
* [https://briancaos.wordpress.com/2009/10/02/assigning-security-to-items-in-sitecore-6-programatically/](https://briancaos.wordpress.com/2009/10/02/assigning-security-to-items-in-sitecore-6-programatically/)
|
|
254
|
+
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Add-ItemVersion
|
|
2
|
+
|
|
3
|
+
Creates a version of the item in a new language based on an existing language version.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
Add-ItemVersion [-Item] <Item> [-Recurse] [-IfExist <Append | Skip | OverwriteLatest>] [-TargetLanguage <String[]>] [-DoNotCopyFields] [-IgnoredFields <String[]>] [-Language <String[]>]
|
|
9
|
+
|
|
10
|
+
Add-ItemVersion [-Path] <String> [-Recurse] [-IfExist <Append | Skip | OverwriteLatest>] [-TargetLanguage <String[]>] [-DoNotCopyFields] [-IgnoredFields <String[]>] [-Language <String[]>]
|
|
11
|
+
|
|
12
|
+
Add-ItemVersion -Id <String> [-Database <String>] [-Recurse] [-IfExist <Append | Skip | OverwriteLatest>] [-TargetLanguage <String[]>] [-DoNotCopyFields] [-IgnoredFields <String[]>] [-Language <String[]>]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Detailed Description
|
|
16
|
+
|
|
17
|
+
Creates a new version of the item in a specified language based on an existing language/version. Based on parameters you can make the command bahave differently when a version in the target language already exists and define which fields if any should be copied over from the original language.
|
|
18
|
+
|
|
19
|
+
© 2010-2020 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
20
|
+
|
|
21
|
+
## Aliases
|
|
22
|
+
|
|
23
|
+
The following abbreviations are aliases for this cmdlet:
|
|
24
|
+
|
|
25
|
+
* Add-ItemLanguage
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
### -Recurse <SwitchParameter>
|
|
30
|
+
|
|
31
|
+
Process the item and all of its children.
|
|
32
|
+
|
|
33
|
+
| Aliases | |
|
|
34
|
+
| :--- | :--- |
|
|
35
|
+
| Required? | false |
|
|
36
|
+
| Position? | named |
|
|
37
|
+
| Default Value | |
|
|
38
|
+
| Accept Pipeline Input? | false |
|
|
39
|
+
| Accept Wildcard Characters? | false |
|
|
40
|
+
|
|
41
|
+
### -IfExist <ActionIfExists>
|
|
42
|
+
|
|
43
|
+
Default value is Append. Accepts one of 3 values:
|
|
44
|
+
|
|
45
|
+
* Append - \[Default\] if language version exists create a new version with values copied from the original language
|
|
46
|
+
* Skip - if language version exists don't do anything
|
|
47
|
+
* OverwriteLatest - if language version exists overwrite the last version with values copied from the original language
|
|
48
|
+
|
|
49
|
+
| Aliases | |
|
|
50
|
+
| :--- | :--- |
|
|
51
|
+
| Required? | false |
|
|
52
|
+
| Position? | named |
|
|
53
|
+
| Default Value | |
|
|
54
|
+
| Accept Pipeline Input? | false |
|
|
55
|
+
| Accept Wildcard Characters? | false |
|
|
56
|
+
|
|
57
|
+
### -IfNoSourceVersion <ActionIfNoVersion>
|
|
58
|
+
|
|
59
|
+
Default value is Skip. Accepts one of 2 values:
|
|
60
|
+
|
|
61
|
+
* Skip - \[Default\] if the source item has no versions don't do anything
|
|
62
|
+
* Add - if the source item has no versions create a version without any copied values
|
|
63
|
+
|
|
64
|
+
| Aliases | |
|
|
65
|
+
| :--- | :--- |
|
|
66
|
+
| Required? | false |
|
|
67
|
+
| Position? | named |
|
|
68
|
+
| Default Value | |
|
|
69
|
+
| Accept Pipeline Input? | false |
|
|
70
|
+
| Accept Wildcard Characters? | false |
|
|
71
|
+
|
|
72
|
+
### -TargetLanguage <String\[\]>
|
|
73
|
+
|
|
74
|
+
Language or a list of languages that should be created
|
|
75
|
+
|
|
76
|
+
| Aliases | |
|
|
77
|
+
| :--- | :--- |
|
|
78
|
+
| Required? | false |
|
|
79
|
+
| Position? | named |
|
|
80
|
+
| Default Value | |
|
|
81
|
+
| Accept Pipeline Input? | false |
|
|
82
|
+
| Accept Wildcard Characters? | false |
|
|
83
|
+
|
|
84
|
+
### -DoNotCopyFields <SwitchParameter>
|
|
85
|
+
|
|
86
|
+
Creates a new version in the target language but does not copy field values from the original language
|
|
87
|
+
|
|
88
|
+
| Aliases | |
|
|
89
|
+
| :--- | :--- |
|
|
90
|
+
| Required? | false |
|
|
91
|
+
| Position? | named |
|
|
92
|
+
| Default Value | |
|
|
93
|
+
| Accept Pipeline Input? | false |
|
|
94
|
+
| Accept Wildcard Characters? | false |
|
|
95
|
+
|
|
96
|
+
### -IgnoredFields <String\[\]>
|
|
97
|
+
|
|
98
|
+
List of fields that should not be copied over from original item. As an example, use "\_\_Security" if you don't want the new version to have the same restrictions as the original version.
|
|
99
|
+
|
|
100
|
+
In addition to the fields in -IgnoredFields the following fields are ignored as configured in Spe.config file in the following location: configuration/sitecore/powershell/translation/ignoredFields.
|
|
101
|
+
|
|
102
|
+
Fields ignored out of the box include:
|
|
103
|
+
|
|
104
|
+
* \_\_Archive date
|
|
105
|
+
* \_\_Archive Version date
|
|
106
|
+
* \_\_Lock
|
|
107
|
+
* \_\_Owner
|
|
108
|
+
* \_\_Page Level Test Set Definition
|
|
109
|
+
* \_\_Reminder date
|
|
110
|
+
* \_\_Reminder recipients
|
|
111
|
+
* \_\_Reminder text
|
|
112
|
+
|
|
113
|
+
| Aliases | |
|
|
114
|
+
| :--- | :--- |
|
|
115
|
+
| Required? | false |
|
|
116
|
+
| Position? | named |
|
|
117
|
+
| Default Value | |
|
|
118
|
+
| Accept Pipeline Input? | false |
|
|
119
|
+
| Accept Wildcard Characters? | false |
|
|
120
|
+
|
|
121
|
+
### -Language <String\[\]>
|
|
122
|
+
|
|
123
|
+
Language that will be used as source language. If not specified the current user language will be used.
|
|
124
|
+
|
|
125
|
+
| Aliases | |
|
|
126
|
+
| :--- | :--- |
|
|
127
|
+
| Required? | false |
|
|
128
|
+
| Position? | named |
|
|
129
|
+
| Default Value | |
|
|
130
|
+
| Accept Pipeline Input? | false |
|
|
131
|
+
| Accept Wildcard Characters? | false |
|
|
132
|
+
|
|
133
|
+
### -Item <Item>
|
|
134
|
+
|
|
135
|
+
The item / version to be processed.
|
|
136
|
+
|
|
137
|
+
| Aliases | |
|
|
138
|
+
| :--- | :--- |
|
|
139
|
+
| Required? | true |
|
|
140
|
+
| Position? | 1 |
|
|
141
|
+
| Default Value | |
|
|
142
|
+
| Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
|
|
143
|
+
| Accept Wildcard Characters? | false |
|
|
144
|
+
|
|
145
|
+
### -Path <String>
|
|
146
|
+
|
|
147
|
+
Path to the item to be processed - additionally specify Language parameter to fetch different item language than the current user language.
|
|
148
|
+
|
|
149
|
+
| Aliases | |
|
|
150
|
+
| :--- | :--- |
|
|
151
|
+
| Required? | true |
|
|
152
|
+
| Position? | 1 |
|
|
153
|
+
| Default Value | |
|
|
154
|
+
| Accept Pipeline Input? | false |
|
|
155
|
+
| Accept Wildcard Characters? | false |
|
|
156
|
+
|
|
157
|
+
### -Id <String>
|
|
158
|
+
|
|
159
|
+
Id of the item to be processed - additionally specify Language parameter to fetch different item language than the current user language.
|
|
160
|
+
|
|
161
|
+
| Aliases | |
|
|
162
|
+
| :--- | :--- |
|
|
163
|
+
| Required? | true |
|
|
164
|
+
| Position? | named |
|
|
165
|
+
| Default Value | |
|
|
166
|
+
| Accept Pipeline Input? | false |
|
|
167
|
+
| Accept Wildcard Characters? | false |
|
|
168
|
+
|
|
169
|
+
### -Database <String>
|
|
170
|
+
|
|
171
|
+
Database containing the item to be processed - can work with Language parameter to narrow the publication scope.
|
|
172
|
+
|
|
173
|
+
| Aliases | |
|
|
174
|
+
| :--- | :--- |
|
|
175
|
+
| Required? | false |
|
|
176
|
+
| Position? | named |
|
|
177
|
+
| Default Value | |
|
|
178
|
+
| Accept Pipeline Input? | false |
|
|
179
|
+
| Accept Wildcard Characters? | false |
|
|
180
|
+
|
|
181
|
+
## Inputs
|
|
182
|
+
|
|
183
|
+
The input type is the type of the objects that you can pipe to the cmdlet.
|
|
184
|
+
|
|
185
|
+
* Sitecore.Data.Items.Item
|
|
186
|
+
|
|
187
|
+
## Outputs
|
|
188
|
+
|
|
189
|
+
The output type is the type of the objects that the cmdlet emits.
|
|
190
|
+
|
|
191
|
+
* Sitecore.Data.Items.Item
|
|
192
|
+
|
|
193
|
+
## Notes
|
|
194
|
+
|
|
195
|
+
Help Author: Adam Najmanowicz, Michael West
|
|
196
|
+
|
|
197
|
+
## Examples
|
|
198
|
+
|
|
199
|
+
### EXAMPLE 1
|
|
200
|
+
|
|
201
|
+
Translate the Home Item from English to US and Polish leaving the "Title" field blank. If a version exists don't do anything
|
|
202
|
+
|
|
203
|
+
```powershell
|
|
204
|
+
PS master:\> Add-ItemVersion -Path "master:\content\home" -Language "en" -TargetLanguage "pl-pl", "en-us" -IfExist Skip -IgnoredFields "Title"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### EXAMPLE 2
|
|
208
|
+
|
|
209
|
+
```powershell
|
|
210
|
+
Add a Japanese version to /sitecore/content/home item in the master database based on itself
|
|
211
|
+
PS master:\> Add-ItemVersion -Path "master:\content\home" -Language ja-JP -IfExist Append
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### EXAMPLE 3
|
|
215
|
+
|
|
216
|
+
Translate the children of Home item \(but only those of Template Name "Sample Item"\) from English to US and Polish. If a version exists create a new version for that language. Display results in a table listing item name, language and created version number.
|
|
217
|
+
|
|
218
|
+
```powershell
|
|
219
|
+
Get-ChildItem "master:\content\home" -Language "en" -Recurse | `
|
|
220
|
+
Where-Object { $_.TemplateName -eq "Sample Item" } | `
|
|
221
|
+
Add-ItemVersion -TargetLanguage "pl-pl" -IfExist Append | `
|
|
222
|
+
Format-Table Name, Language, Version -auto
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Related Topics
|
|
226
|
+
|
|
227
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
228
|
+
* [Remove-ItemVersion](remove-itemversion.md)
|
|
229
|
+
* New-Item
|
|
230
|
+
* [https://gist.github.com/AdamNaj/b36ea095e3668c22c07e](https://gist.github.com/AdamNaj/b36ea095e3668c22c07e)
|
|
231
|
+
|