Revert "bucket: refactor policies and fix bugs related to enforcing policies. (#2766)"

This reverts commit ca5ca8332b.
This commit is contained in:
Harshavardhana
2016-09-26 14:28:35 -07:00
parent cfbab22237
commit 6aa2fc95c0
10 changed files with 144 additions and 19 deletions

View File

@@ -196,6 +196,9 @@ func (api objectAPIHandlers) PutBucketPolicyHandler(w http.ResponseWriter, r *ht
return
}
// Set the bucket policy in memory.
globalBucketPolicies.SetBucketPolicy(bucket, policy)
// Success.
writeSuccessNoContent(w)
}
@@ -239,6 +242,9 @@ func (api objectAPIHandlers) DeleteBucketPolicyHandler(w http.ResponseWriter, r
return
}
// Remove bucket policy.
globalBucketPolicies.RemoveBucketPolicy(bucket)
// Success.
writeSuccessNoContent(w)
}