Azure / Azure/Azurite

Azurite doesn't support permissions property of accessPolicy parameter is null or undefined in Set ACL operation on container.

Open
#638 6 comments 0 reactions 1 assignee Claimed by @blueww View on GitHub
blob-storage bug NewArch
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

**Error Description:**
In Azure, it will set ACL successfully when use Set ACL operation without permissions on container.
But in Azurite, it will return an error as following in this case:
![Screenshot 2020-11-18 204618](https://user-images.githubusercontent.com/20970631/99532410-3810c100-29df-11eb-8b16-7e2a4a1cd731.png)

**To Reproduce**
Please run the demo code as following:
```
import {
BlobServiceClient, BlockBlobClient
} from "@azure/storage-blob";

async function main(){
const blobServiceClient = await BlobServiceClient.fromConnectionString("");
const containerClient=await blobServiceClient.getContainerClient("");
var now = new Date();
now.setMinutes(now.getMinutes() - 5);
var tmr = new Date();
tmr.setDate(tmr.getDate() + 1);
var id= "id"

containerClient.setAccessPolicy(undefined,[{accessPolicy:{
expiresOn: tmr,
startsOn: now
},id}]
)
}

main();
```

**Error Track**
The reason maybe is that the required of the permission in AccessPolicy is set true in Azurite. The code is shown as following:
https://github.com/Azure/Azurite/blob/master/src/blob/generated/artifacts/mappers.ts#L183
![Screenshot 2020-11-19 164218](https://user-images.githubusercontent.com/20970631/100211440-1bc4d500-2f47-11eb-8f68-cb41ab15a3e0.png)

**Expected behavior**
When use Set ACL operation without permissions on container, it will set ACL successfully in Azurite.

@jongio for notification.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.