]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/acl: remove unused virtual compare_group_name()
authorCasey Bodley <cbodley@redhat.com>
Thu, 16 Nov 2023 01:17:54 +0000 (20:17 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 30 Nov 2023 15:40:45 +0000 (10:40 -0500)
that was the only virtual function, so remove virtual destructors too

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_acl.h
src/rgw/rgw_acl_s3.cc
src/rgw/rgw_acl_s3.h
src/rgw/rgw_acl_swift.h

index f2dacf28543248ed268082c8553a1175dafeeff8..ff9de6c81ffbef074bfd464da73698590fcb041a 100644 (file)
@@ -283,7 +283,7 @@ public:
   ACLGrantMap& get_grant_map() { return grant_map; }
   const ACLGrantMap& get_grant_map() const { return grant_map; }
 
-  void create_default(const rgw_user& id, std::string name) {
+  void create_default(const rgw_user& id, const std::string& name) {
     acl_user_map.clear();
     acl_group_map.clear();
     referer_list.clear();
@@ -336,7 +336,6 @@ protected:
 public:
   explicit RGWAccessControlPolicy(CephContext *_cct) : cct(_cct), acl(_cct) {}
   RGWAccessControlPolicy() : cct(NULL), acl(NULL) {}
-  virtual ~RGWAccessControlPolicy() {}
 
   void set_ctx(CephContext *ctx) {
     cct = ctx;
@@ -391,7 +390,6 @@ public:
     return acl;
   }
 
-  virtual bool compare_group_name(std::string& id, ACLGroupTypeEnum group) { return false; }
   bool is_public(const DoutPrefixProvider *dpp) const;
 
   friend bool operator==(const RGWAccessControlPolicy& lhs, const RGWAccessControlPolicy& rhs);
index 46a427572be0fea083f1d02d5a4bdbf0e4d562d4..4700f09965142e3b2f4334024ba3b41fe89de667 100644 (file)
@@ -589,21 +589,6 @@ int RGWAccessControlPolicy_S3::rebuild(const DoutPrefixProvider *dpp,
   return 0; 
 }
 
-bool RGWAccessControlPolicy_S3::compare_group_name(string& id, ACLGroupTypeEnum group)
-{
-  switch (group) {
-  case ACL_GROUP_ALL_USERS:
-    return (id.compare(RGW_USER_ANON_ID) == 0);
-  case ACL_GROUP_AUTHENTICATED_USERS:
-    return (id.compare(rgw_uri_auth_users) == 0);
-  default:
-    return id.empty();
-  }
-
-  // shouldn't get here
-  return false;
-}
-
 XMLObj *RGWACLXMLParser_S3::alloc_obj(const char *el)
 {
   XMLObj * obj = NULL;
index c58307600d4442d7534e5ec46bba4e338727bb55..96480ff8bdd8e31bf84def0b417f06053758b175 100644 (file)
@@ -85,7 +85,6 @@ public:
   void to_xml(std::ostream& out);
   int rebuild(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, ACLOwner *owner,
              RGWAccessControlPolicy& dest, std::string &err_msg);
-  bool compare_group_name(std::string& id, ACLGroupTypeEnum group) override;
 
   virtual int create_canned(ACLOwner& _owner, ACLOwner& bucket_owner, const std::string& canned_acl) {
     RGWAccessControlList_S3& _acl = static_cast<RGWAccessControlList_S3 &>(acl);
index 4cb1e4b8f8f57b909b9a365a118daeb7d1549f5c..fee32ae06abf22d5bbc6b79f313e1274700f96f0 100644 (file)
@@ -24,7 +24,6 @@ public:
   explicit RGWAccessControlPolicy_SWIFT(CephContext* const cct)
     : RGWAccessControlPolicy(cct) {
   }
-  ~RGWAccessControlPolicy_SWIFT() override = default;
 
   int create(const DoutPrefixProvider *dpp,
             rgw::sal::Driver* driver,
@@ -43,7 +42,6 @@ public:
   explicit RGWAccessControlPolicy_SWIFTAcct(CephContext * const cct)
     : RGWAccessControlPolicy(cct) {
   }
-  ~RGWAccessControlPolicy_SWIFTAcct() override {}
 
   void add_grants(const DoutPrefixProvider *dpp,
                  rgw::sal::Driver* driver,