} else {
perm_policy_map.erase(it);
}
- return 0;
+ return 0;
}
void RGWRole::dump(Formatter *f) const
return true;
}
-void RGWRole::extract_name_tenant(const std::string& str)
-{
- size_t pos = str.find('$');
- if (pos != std::string::npos) {
+void RGWRole::extract_name_tenant(const std::string& str) {
+ if (auto pos = str.find('$');
+ pos != std::string::npos) {
tenant = str.substr(0, pos);
- name = str.substr(pos + 1);
+ name = str.substr(pos+1);
}
}
tags(std::move(tags)) {
if (this->path.empty())
this->path = "/";
- extract_name_tenant(this->name);
+ extract_name_tenant(name);
if (max_session_duration_str.empty()) {
max_session_duration = SESSION_DURATION_MIN;
} else {