]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: cleanup for RGWDeleteObj::verify_permission() 26310/head
authorEnming.Zhang <zvampirem77@gmail.com>
Tue, 27 Nov 2018 11:41:56 +0000 (06:41 -0500)
committerPrashant D <pdhange@redhat.com>
Wed, 6 Feb 2019 23:19:31 +0000 (18:19 -0500)
- if the 'Effect' field of user policy and bucket policy
  is set to 'Allow', RGWDeleteObj::verify_permission()
  should return 0 instead of true;

- as the same with bucket policy, if the 'Effect' field
  of user policy is set to 'Deny', RGWDeleteObj::verify_permission()
  should return -EACCES instead of false;

Signed-off-by: Enming.Zhang <zvampirem77@gmail.com>
(cherry picked from commit 86334645cf96c03515d30804e2df0bdf22916fb5)

Conflicts:
src/rgw/rgw_op.cc : Resolved in verify_permission

src/rgw/rgw_op.cc

index 31925e57db75315d5d48a8316fc06023b3dff37e..f9e67c0d75d397a8f929274f8b2919db116e7b75 100644 (file)
@@ -4238,7 +4238,7 @@ int RGWDeleteObj::verify_permission()
                                 rgw::IAM::s3DeleteObjectVersion,
                                 ARN(s->bucket, s->object.name));
     if (r == Effect::Allow)
-      return true;
+      return 0;
     else if (r == Effect::Deny)
       return -EACCES;
   }