|
@ -399,11 +399,10 @@ func getObjectEntry(s3a *S3ApiServer, bucket, object string) (*filer_pb.Entry, e |
|
|
return s3a.getEntry(util.Join(s3a.option.BucketsPath, bucket), object) |
|
|
return s3a.getEntry(util.Join(s3a.option.BucketsPath, bucket), object) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (s3a *S3ApiServer) ExtractBucketAcp(r *http.Request) (owner string, grants []*s3.Grant, errCode s3err.ErrorCode) { |
|
|
|
|
|
|
|
|
func (s3a *S3ApiServer) ExtractBucketAcp(r *http.Request, objectOwnership string) (owner string, grants []*s3.Grant, errCode s3err.ErrorCode) { |
|
|
accountId := s3acl.GetAccountId(r) |
|
|
accountId := s3acl.GetAccountId(r) |
|
|
|
|
|
|
|
|
ownership := s3_constants.DefaultOwnershipForCreate |
|
|
|
|
|
if ownership == s3_constants.OwnershipBucketOwnerEnforced { |
|
|
|
|
|
|
|
|
if objectOwnership == s3_constants.OwnershipBucketOwnerEnforced { |
|
|
return accountId, []*s3.Grant{ |
|
|
return accountId, []*s3.Grant{ |
|
|
{ |
|
|
{ |
|
|
Permission: &s3_constants.PermissionFullControl, |
|
|
Permission: &s3_constants.PermissionFullControl, |
|
@ -414,6 +413,6 @@ func (s3a *S3ApiServer) ExtractBucketAcp(r *http.Request) (owner string, grants |
|
|
}, |
|
|
}, |
|
|
}, s3err.ErrNone |
|
|
}, s3err.ErrNone |
|
|
} else { |
|
|
} else { |
|
|
return s3acl.ParseAndValidateAclHeadersOrElseDefault(r, s3a.accountManager, ownership, accountId, accountId, false) |
|
|
|
|
|
|
|
|
return s3acl.ParseAndValidateAclHeadersOrElseDefault(r, s3a.accountManager, objectOwnership, accountId, accountId, false) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |