]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: role fixes
authorAbhishek Lekshmanan <abhishek@suse.com>
Thu, 15 Oct 2020 15:52:20 +0000 (17:52 +0200)
committerPritha Srivastava <prsrivas@redhat.com>
Mon, 6 Jun 2022 10:49:42 +0000 (16:19 +0530)
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/services/svc_role_rados.cc

index 62a9d6a131567947c2c014c56c292679163af20c..bd5461b8ab5365e2c8ba9a85765a72d9614c22f4 100644 (file)
@@ -9,7 +9,6 @@
 
 class RGWSI_Role_Module : public RGWSI_MBSObj_Handler_Module {
   RGWSI_Role_RADOS::Svc& svc;
-  std::string prefix;
 public:
   RGWSI_Role_Module(RGWSI_Role_RADOS::Svc& _svc): RGWSI_MBSObj_Handler_Module("Role"),
                                                   svc(_svc) {}
@@ -28,8 +27,7 @@ public:
   }
 
   bool is_valid_oid(const std::string& oid) override {
-    return !boost::algorithm::starts_with(oid, role_name_oid_prefix) ||
-      !boost::algorithm::starts_with(oid, role_path_oid_prefix);
+    return boost::algorithm::starts_with(oid, role_oid_prefix);
   }
 
   std::string key_to_oid(const std::string& key) override {
@@ -41,7 +39,7 @@ public:
   }
 
   const std::string& get_oid_prefix() {
-    return prefix;
+    return role_oid_prefix;
   }
 };