]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: cleanup for RGWDeleteObj::verify_permission() 26309/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:24:25 +0000 (18:24 -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 : Resolve in verify_permission

src/rgw/rgw_op.cc

index a54b512f047e55d5afd994e260ca8def7890e44e..0565fce5e05f3d41f4004237e47bbb7791403fe4 100644 (file)
@@ -4350,7 +4350,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;
   }