[#492] layer: Don't parameterize basic ACL of created containers

`CreateBucket` handler always creates containers with extended public
ACL, so there is no need to configure it in `NeoFS.CreateContainer`.

Make internal `NeoFS` implementation to create containers with
`eacl-public-read-write` basic ACL if corresponding parameter is unset.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-06-10 04:59:17 +03:00 committed by Alex Vanin
parent 0e27fea8f2
commit 880ffe7108
6 changed files with 12 additions and 9 deletions

View file

@ -163,8 +163,6 @@ const (
basicACLReadOnly = "public-read"
basicACLPublic = "public-read-write"
cannedACLAuthRead = "authenticated-read"
publicBasicRule = 0x0FFFFFFF
)
type createBucketParams struct {
@ -572,7 +570,9 @@ func parseMetadata(r *http.Request) map[string]string {
func (h *handler) CreateBucketHandler(w http.ResponseWriter, r *http.Request) {
var (
reqInfo = api.GetReqInfo(r.Context())
p = layer.CreateBucketParams{Name: reqInfo.BucketName, ACL: publicBasicRule}
p = layer.CreateBucketParams{
Name: reqInfo.BucketName,
}
)
if err := checkBucketName(reqInfo.BucketName); err != nil {