Skip to content

Commit

Permalink
[Storage] Fixed get contaienr access policy fail when permission in n…
Browse files Browse the repository at this point in the history
…ull [Azure#15644]
  • Loading branch information
blueww committed Dec 1, 2021
1 parent 509caef commit c90e239
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Storage/Storage.Management/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Upcoming Release
* Fixed get container access policy fail when permission in null [#15644]
- `Get-AzStorageContainerStoredAccessPolicy`
* Fixed creating container SAS token failed from an access policy without expire time, and set SAS token expire time [#16266]
- `New-AzStorageContainerSASToken`
* Removed parameter -Name from Get-AzRmStorageShare ShareResourceIdParameterSet
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Storage/Common/AccessPolicyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ internal static PSObject ConstructPolicyOutputPSObject<T>(T identifier)
"Policy",
(identifier).GetType().GetProperty("Id").GetValue(identifier),
"Permissions",
(accessPolicy).GetType().GetProperty("Permissions").GetValue(accessPolicy).ToString(),
(accessPolicy).GetType().GetProperty("Permissions").GetValue(accessPolicy) is null ? null: (accessPolicy).GetType().GetProperty("Permissions").GetValue(accessPolicy).ToString(),
"StartTime",
(accessPolicy).GetType().GetProperty("PolicyStartsOn").GetValue(accessPolicy),
"ExpiryTime",
Expand Down

0 comments on commit c90e239

Please sign in to comment.