Make BucketPolicy strictly typed

This commit is contained in:
Harshavardhana
2015-03-08 15:57:18 -07:00
parent 7b57797455
commit 01e98eb326
6 changed files with 19 additions and 22 deletions

View File

@@ -23,7 +23,6 @@ import (
"github.com/gorilla/mux"
mstorage "github.com/minio-io/minio/pkg/storage"
"github.com/minio-io/minio/pkg/utils/policy"
)
// PUT Bucket policy
@@ -35,7 +34,7 @@ func (server *minioAPI) putBucketPolicyHandler(w http.ResponseWriter, req *http.
bucket := vars["bucket"]
acceptsContentType := getContentType(req)
policy, ok := policy.Parsepolicy(req.Body)
policy, ok := mstorage.Parsepolicy(req.Body)
if ok == false {
error := errorCodeError(InvalidPolicyDocument)
errorResponse := getErrorResponse(error, bucket)