ACL driver/storage layer support

This commit is contained in:
Harshavardhana
2015-04-22 18:19:53 -07:00
parent c8713fd650
commit 1c0ff2c758
13 changed files with 134 additions and 51 deletions

View File

@@ -25,7 +25,8 @@ import (
"github.com/minio-io/minio/pkg/iodine"
)
func (d donut) makeDonutBucket(bucketName string) error {
// TODO we have to store the acl's
func (d donut) makeDonutBucket(bucketName, acl string) error {
err := d.getDonutBuckets()
if err != nil {
return iodine.New(err, nil)
@@ -33,7 +34,7 @@ func (d donut) makeDonutBucket(bucketName string) error {
if _, ok := d.buckets[bucketName]; ok {
return iodine.New(errors.New("bucket exists"), nil)
}
bucket, err := NewBucket(bucketName, d.name, d.nodes)
bucket, err := NewBucket(bucketName, acl, d.name, d.nodes)
if err != nil {
return iodine.New(err, nil)
}
@@ -74,7 +75,7 @@ func (d donut) getDonutBuckets() error {
}
bucketName := splitDir[0]
// we dont need this NewBucket once we cache from makeDonutBucket()
bucket, err := NewBucket(bucketName, d.name, d.nodes)
bucket, err := NewBucket(bucketName, "private", d.name, d.nodes)
if err != nil {
return iodine.New(err, nil)
}