Browse Source

Merge branch '5_objectWriteAcl' into 10_acl_merged

# Conflicts:
#	weed/s3api/s3api_acp.go
#	weed/s3api/s3api_object_handlers.go
pull/4090/head
changlin.shi 2 years ago
parent
commit
2a239ca97f
  1. 4
      weed/s3api/s3api_acp.go
  2. 4
      weed/s3api/s3api_object_handlers.go

4
weed/s3api/s3api_acp.go

@ -255,8 +255,8 @@ func (s3a *S3ApiServer) checkAccessForWriteObjectAcl(accountId, bucket, object s
return nil, nil, "", s3err.ErrAccessDenied
}
func updateObjectEntry(s3a *S3ApiServer, bucket string, entry *filer_pb.Entry) error {
return s3a.updateEntry(util.Join(s3a.option.BucketsPath, bucket), entry)
func updateObjectEntry(s3a *S3ApiServer, bucket, object string, entry *filer_pb.Entry) error {
return s3a.updateEntry(util.Join(s3a.option.BucketsPath, bucket, object), entry)
}
// Check Object-Write related access

4
weed/s3api/s3api_object_handlers.go

@ -8,8 +8,8 @@ import (
"fmt"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
"github.com/seaweedfs/seaweedfs/weed/s3api/s3acl"
"github.com/seaweedfs/seaweedfs/weed/s3api/s3account"
"github.com/seaweedfs/seaweedfs/weed/s3api/s3acl"
"github.com/seaweedfs/seaweedfs/weed/security"
"github.com/seaweedfs/seaweedfs/weed/util/mem"
"golang.org/x/exp/slices"
@ -588,7 +588,7 @@ func (s3a *S3ApiServer) PutObjectAclHandler(w http.ResponseWriter, r *http.Reque
return
}
err := updateObjectEntry(s3a, bucket, objectEntry)
err := updateObjectEntry(s3a, bucket, object, objectEntry)
if err != nil {
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
return

Loading…
Cancel
Save