return 0;
}
-int RadosStore::load_account_role_by_name(const DoutPrefixProvider* dpp,
- optional_yield y,
- std::string_view account_id,
- std::string_view rolename,
- std::unique_ptr<RGWRole>* role)
-{
- RGWRoleInfo info;
- info.account_id = account_id;
- info.name = rolename;
- auto p = get_role(info);
- int r = p->get(dpp, y);
- if (r < 0) {
- ldpp_dout(dpp, 20) << "failed to load account role " << rolename
- << ": " << cpp_strerror(r) << dendl;
- return r;
- }
- *role = std::move(p);
- return 0;
-}
-
int RadosStore::count_account_roles(const DoutPrefixProvider* dpp,
optional_yield y,
std::string_view account_id,
std::string_view email,
rgw_owner& owner) override;
- int load_account_role_by_name(const DoutPrefixProvider* dpp,
- optional_yield y,
- std::string_view account_id,
- std::string_view name,
- std::unique_ptr<RGWRole>* role) override;
int count_account_roles(const DoutPrefixProvider* dpp,
optional_yield y,
std::string_view account_id,
std::string_view email,
rgw_owner& owner) = 0;
- /** Load an account's role by name. */
- virtual int load_account_role_by_name(const DoutPrefixProvider* dpp,
- optional_yield y,
- std::string_view account_id,
- std::string_view name,
- std::unique_ptr<RGWRole>* role) = 0;
/** Count the number of roles belonging to the given account. */
virtual int count_account_roles(const DoutPrefixProvider* dpp,
optional_yield y,
return 0;
}
- int DBStore::load_account_role_by_name(const DoutPrefixProvider* dpp,
- optional_yield y,
- std::string_view account_id,
- std::string_view name,
- std::unique_ptr<RGWRole>* role)
- {
- return -ENOTSUP;
- }
-
int DBStore::count_account_roles(const DoutPrefixProvider* dpp,
optional_yield y,
std::string_view account_id,
std::string_view email,
rgw_owner& owner) override;
- int load_account_role_by_name(const DoutPrefixProvider* dpp,
- optional_yield y,
- std::string_view account_id,
- std::string_view name,
- std::unique_ptr<RGWRole>* role) override;
int count_account_roles(const DoutPrefixProvider* dpp,
optional_yield y,
std::string_view account_id,
return next->load_owner_by_email(dpp, y, email, owner);
}
-int FilterDriver::load_account_role_by_name(const DoutPrefixProvider* dpp,
- optional_yield y,
- std::string_view account_id,
- std::string_view name,
- std::unique_ptr<RGWRole>* role)
-{
- return next->load_account_role_by_name(dpp, y, account_id, name, role);
-}
-
int FilterDriver::count_account_roles(const DoutPrefixProvider* dpp,
optional_yield y,
std::string_view account_id,
optional_yield y,
std::string_view email,
rgw_owner& owner) override;
- int load_account_role_by_name(const DoutPrefixProvider* dpp,
- optional_yield y,
- std::string_view account_id,
- std::string_view name,
- std::unique_ptr<RGWRole>* role) override;
int count_account_roles(const DoutPrefixProvider* dpp,
optional_yield y,
std::string_view account_id,