]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW: IAM: support s3:x-amz-acl conditional for PutACLs
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 8 Aug 2017 14:17:34 +0000 (16:17 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Wed, 17 Jan 2018 10:28:56 +0000 (11:28 +0100)
Support string-like s3:x-amz-acl conditional  for PutACL request. We're
still to support lists for this

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_op.cc

index 9bfe60c323e6a9406a2a3389db02bfd664675cff..f8bdf28c38c4ccd87ed2dcca35abc6a4eedc730e 100644 (file)
@@ -4619,6 +4619,11 @@ void RGWGetACLs::execute()
 int RGWPutACLs::verify_permission()
 {
   bool perm;
+
+  if (!s->canned_acl.empty()){
+    rgw_add_to_iam_environment(s->env, "s3:x-amz-acl", s->canned_acl);
+  }
+
   if (!s->object.empty()) {
     perm = verify_object_permission(s,
                                    s->object.instance.empty() ?