fix NAS gateway support for policy/notification (#9765)

Fixes #9764
This commit is contained in:
Harshavardhana
2020-06-03 13:18:54 -07:00
committed by GitHub
parent b91040f7fb
commit 5686a7e273
8 changed files with 79 additions and 73 deletions

View File

@@ -37,13 +37,6 @@ type PolicySys struct{}
// Get returns stored bucket policy
func (sys *PolicySys) Get(bucket string) (*policy.Policy, error) {
if globalIsGateway {
objAPI := newObjectLayerFn()
if objAPI == nil {
return nil, errServerNotInitialized
}
return objAPI.GetBucketPolicy(GlobalContext, bucket)
}
return globalBucketMetadataSys.GetPolicyConfig(bucket)
}