@@ -341,10 +341,10 @@ $Id = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
341
341
# Get the directory ACL
342
342
$acl = (Get-AzDataLakeGen2Item -Context $ctx -FileSystem $filesystemName -Path $dirname).ACL
343
343
344
- # Create the new ACL object that will be update to server
344
+ # Create the new ACL object.
345
345
[Collections.Generic.List[System.Object]]$aclnew =$acl
346
346
347
- # Remove the ACL entries that will be added later to avoid duplicate
347
+ # To avoid duplicate ACL, remove the ACL entries that will be added later.
348
348
foreach ($a in $aclnew)
349
349
{
350
350
if ($a.AccessControlType -eq "group" -and $a.DefaultScope -eq $true-and $a.EntityId -eq $id)
@@ -354,10 +354,10 @@ foreach ($a in $aclnew)
354
354
}
355
355
}
356
356
357
- # Add Acl Entries
357
+ # Add ACL Entries
358
358
$aclnew = New-AzDataLakeGen2ItemAclObject -AccessControlType group -EntityId $id -Permission "-wx" -DefaultScope -InputObject $aclnew
359
359
360
- # Update to Server
360
+ # Update ACL on server
361
361
Update-AzDataLakeGen2Item -Context $ctx -FileSystem $filesystemName -Path $dirname -Acl $aclnew
362
362
363
363
```
@@ -372,10 +372,10 @@ $Id = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
372
372
# Get the file ACL
373
373
$acl = (Get-AzDataLakeGen2Item -Context $ctx -FileSystem $filesystemName -Path $fileName).ACL
374
374
375
- # Create the new ACL object that will be update to server
375
+ # Create the new ACL object.
376
376
[Collections.Generic.List[System.Object]]$aclnew =$acl
377
377
378
- # Remove the ACL entries that will be added later to avoid duplicate
378
+ # To avoid duplicate ACL, remove the ACL entries that will be added later.
379
379
foreach ($a in $aclnew)
380
380
{
381
381
if ($a.AccessControlType -eq "group" -and $a.DefaultScope -eq $true-and $a.EntityId -eq $id)
@@ -385,10 +385,10 @@ foreach ($a in $aclnew)
385
385
}
386
386
}
387
387
388
- # Add Acl Entries
388
+ # Add ACL Entries
389
389
$aclnew = New-AzDataLakeGen2ItemAclObject -AccessControlType group -EntityId $id -Permission "-wx" -DefaultScope -InputObject $aclnew
390
390
391
- # Update to Server
391
+ # Update ACL on server
392
392
Update-AzDataLakeGen2Item -Context $ctx -FileSystem $filesystemName -Path $fileName -Acl $aclnew
393
393
394
394
```
0 commit comments