Skip to content

Commit

Permalink
Fix for issue Azure#11505
Browse files Browse the repository at this point in the history
Fixes the issue Azure#11505 (Azure#11505)
  • Loading branch information
gmantri authored Sep 28, 2020
1 parent 51d19c0 commit 5cc7351
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions sdk/storage/storage-file-share/src/ShareClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -988,12 +988,22 @@ export class ShareClient extends StorageClient {
};

for (const identifier of response) {
let accessPolicy: any = undefined;
if (identifier.accessPolicy) {
accessPolicy = {
permissions: identifier.accessPolicy.permissions
};

if (identifier.accessPolicy.expiresOn) {
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
}

if (identifier.accessPolicy.startsOn) {
accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn);
}
}
res.signedIdentifiers.push({
accessPolicy: {
expiresOn: new Date(identifier.accessPolicy!.expiresOn!),
permissions: identifier.accessPolicy!.permissions!,
startsOn: new Date(identifier.accessPolicy!.startsOn!)
},
accessPolicy,
id: identifier.id
});
}
Expand Down

0 comments on commit 5cc7351

Please sign in to comment.