Comparing version 0.6.17 to 0.7.0
@@ -19,2 +19,3 @@ 'use strict'; | ||
InvalidHeaderValue: new ErrorCode('InvalidHeaderValue', 400, 'The value provided for one of the HTTP headers was not in the correct format.'), | ||
InvalidInput: new ErrorCode('InvalidInput', 400, 'One of the request inputs is not valid.'), | ||
InvalidPageRange: new ErrorCode('InvalidPageRange', 416, 'The page range specified is invalid.'), | ||
@@ -21,0 +22,0 @@ MissingContentLengthHeader: new ErrorCode('MissingContentLengthHeader', 411, 'The Content-Length header was not specified.'), |
@@ -9,2 +9,3 @@ 'use strict'; | ||
getContainerPropertiesHandler = require('./../api/GetContainerProperties'), | ||
setContainerAclHandler = require('./../api/SetContainerAcl'), | ||
env = require('./../env'); | ||
@@ -44,4 +45,3 @@ | ||
else if (req.query.restype === 'container' && req.query.comp === 'acl') { | ||
// Not fully supported, but that's no reason to fail! | ||
res.status(200).send(); | ||
setContainerAclHandler.process(req, res, req.params.container, req.body); | ||
} | ||
@@ -48,0 +48,0 @@ else if (req.query.restype === 'container') { |
@@ -27,2 +27,3 @@ 'use strict'; | ||
PageAlignmentVal = require('./validation/PageAlignment'), | ||
NumOfSignedIdentifiersVal = require('./validation/NumOfSignedIdentifiers'), | ||
PageBlobHeaderSanityVal = require('./validation/PageBlobHeaderSanity'); | ||
@@ -722,2 +723,26 @@ | ||
setContainerAcl(container, signedIdentifiers) { | ||
return BbPromise.try(() => { | ||
new RootValidator({ | ||
containerName: container.name, | ||
collection: this.db.getCollection(StorageTables.Containers), | ||
model: signedIdentifiers | ||
}) | ||
.run(ContainerExistsVal) | ||
.run(NumOfSignedIdentifiersVal); | ||
const res = this._getCollectionAndContainer(container.name), | ||
coll = res.coll, | ||
updateContainer = res.container; | ||
updateContainer.httpProps = container.httpProps; | ||
updateContainer.signedIdentifiers = signedIdentifiers; | ||
updateContainer.access = container.access; | ||
coll.update(updateContainer); | ||
return { | ||
ETag: updateContainer.meta.revision, | ||
'Last-Modified': updateContainer.httpProps['Last-Modified'] | ||
} | ||
}); | ||
} | ||
_updatePageRanges(collPages, pageRanges, startByte, endByte, name) { | ||
@@ -724,0 +749,0 @@ const startAlignment = startByte / 512, |
{ | ||
"name": "azurite", | ||
"version": "0.6.17", | ||
"version": "0.7.0", | ||
"description": "A lightweight server clone of Azure Blob Storage that simulates most of the commands supported by it with minimal dependencies.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
136310
66
2963