Add NAS gateway support (#5516)

This commit is contained in:
poornas
2018-02-20 12:21:12 -08:00
committed by kannappanr
parent 926e480156
commit 25107c2e11
21 changed files with 259 additions and 95 deletions

View File

@@ -433,7 +433,7 @@ func (s *xlSets) GetBucketPolicy(bucket string) (policy.BucketAccessPolicy, erro
// fetch bucket policy from cache.
bpolicy := s.bucketPolicies.GetBucketPolicy(bucket)
if reflect.DeepEqual(bpolicy, emptyBucketPolicy) {
return readBucketPolicy(bucket, s)
return ReadBucketPolicy(bucket, s)
}
return bpolicy, nil
}
@@ -445,7 +445,7 @@ func (s *xlSets) DeleteBucketPolicy(bucket string) error {
// RefreshBucketPolicy refreshes policy cache from disk
func (s *xlSets) RefreshBucketPolicy(bucket string) error {
policy, err := readBucketPolicy(bucket, s)
policy, err := ReadBucketPolicy(bucket, s)
if err != nil {
if reflect.DeepEqual(policy, emptyBucketPolicy) {
return s.bucketPolicies.DeleteBucketPolicy(bucket)