]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: skip printing ACLOwner in Swift's account ACLs. 8657/head
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 2 Jun 2016 16:55:09 +0000 (18:55 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 2 Jun 2016 19:17:13 +0000 (21:17 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_acl.h
src/rgw/rgw_acl_swift.cc

index fb02758f06f7b0d6120d22b6288d19329607de8f..7ca2ce89a0f553430629c659c2311abd66e6e28d 100644 (file)
@@ -357,6 +357,7 @@ public:
   void set_name(const string& name) { display_name = name; }
 
   rgw_user& get_id() { return id; }
+  const rgw_user& get_id() const { return id; }
   string& get_display_name() { return display_name; }
 };
 WRITE_CLASS_ENCODER(ACLOwner)
index 4cd51469409ef69b5b0b8b5d344b981c55c9eb5d..71121a45a057ac43dcab262f25610efb0dac8985 100644 (file)
@@ -301,6 +301,8 @@ void RGWAccessControlPolicy_SWIFTAcct::to_str(std::string& acl_str) const
         continue;
       }
       id = SWIFT_GROUP_ALL_USERS;
+    } else if (owner.get_id() == id) {
+      continue;
     }
 
     if (SWIFT_PERM_ADMIN == (perm & SWIFT_PERM_ADMIN)) {