mirror of
https://github.com/minio/minio.git
synced 2025-07-26 08:50:08 -04:00
allow bucket policy to set/removed in NAS gateway (#9706)
This commit is contained in:
parent
375b79f11b
commit
7214a0160a
@ -40,7 +40,7 @@ type BucketMetadataSys struct {
|
|||||||
|
|
||||||
// Remove bucket metadata from memory.
|
// Remove bucket metadata from memory.
|
||||||
func (sys *BucketMetadataSys) Remove(bucket string) {
|
func (sys *BucketMetadataSys) Remove(bucket string) {
|
||||||
if globalIsGateway {
|
if globalIsGateway && globalGatewayName != "nas" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
sys.Lock()
|
sys.Lock()
|
||||||
@ -73,7 +73,7 @@ func (sys *BucketMetadataSys) Update(bucket string, configFile string, configDat
|
|||||||
return errServerNotInitialized
|
return errServerNotInitialized
|
||||||
}
|
}
|
||||||
|
|
||||||
if globalIsGateway {
|
if globalIsGateway && globalGatewayName != "nas" {
|
||||||
// This code is needed only for gateway implementations.
|
// This code is needed only for gateway implementations.
|
||||||
if configFile == bucketPolicyConfig {
|
if configFile == bucketPolicyConfig {
|
||||||
config, err := policy.ParseConfig(bytes.NewReader(configData), bucket)
|
config, err := policy.ParseConfig(bytes.NewReader(configData), bucket)
|
||||||
|
@ -186,7 +186,7 @@ function testHeadObject($s3Client, $objects) {
|
|||||||
if (getStatusCode($result) != HTTP_OK)
|
if (getStatusCode($result) != HTTP_OK)
|
||||||
throw new Exception('headObject API failed for ' .
|
throw new Exception('headObject API failed for ' .
|
||||||
$bucket . '/' . $object);
|
$bucket . '/' . $object);
|
||||||
if ($result['Metadata'] != TEST_METADATA) {
|
if (strtolower($result['Metadata']) != strtolower(TEST_METADATA)) {
|
||||||
throw new Exception("headObject API Metadata didn't match for " .
|
throw new Exception("headObject API Metadata didn't match for " .
|
||||||
$bucket . '/' . $object);
|
$bucket . '/' . $object);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user