Skip to content

Commit

Permalink
allow bucket policy to set/removed in NAS gateway (minio#9706)
Browse files Browse the repository at this point in the history
  • Loading branch information
kannappanr authored May 28, 2020
1 parent 375b79f commit 7214a01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/bucket-metadata-sys.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type BucketMetadataSys struct {

// Remove bucket metadata from memory.
func (sys *BucketMetadataSys) Remove(bucket string) {
if globalIsGateway {
if globalIsGateway && globalGatewayName != "nas" {
return
}
sys.Lock()
Expand Down Expand Up @@ -73,7 +73,7 @@ func (sys *BucketMetadataSys) Update(bucket string, configFile string, configDat
return errServerNotInitialized
}

if globalIsGateway {
if globalIsGateway && globalGatewayName != "nas" {
// This code is needed only for gateway implementations.
if configFile == bucketPolicyConfig {
config, err := policy.ParseConfig(bytes.NewReader(configData), bucket)
Expand Down
2 changes: 1 addition & 1 deletion mint/run/core/aws-sdk-php/quick-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function testHeadObject($s3Client, $objects) {
if (getStatusCode($result) != HTTP_OK)
throw new Exception('headObject API failed for ' .
$bucket . '/' . $object);
if ($result['Metadata'] != TEST_METADATA) {
if (strtolower($result['Metadata']) != strtolower(TEST_METADATA)) {
throw new Exception("headObject API Metadata didn't match for " .
$bucket . '/' . $object);
}
Expand Down

0 comments on commit 7214a01

Please sign in to comment.