return true;
}
-void RGWAccessControlPolicy_SWIFTAcct::to_str(std::string& acl_str) const
+boost::optional<std::string> RGWAccessControlPolicy_SWIFTAcct::to_str() const
{
std::vector<std::string> admin;
std::vector<std::string> readwrite;
}
}
+ /* If there is no grant to serialize, let's exit earlier to not return
+ * an empty JSON object which brakes the functional tests of Swift. */
+ if (admin.empty() && readwrite.empty() && readonly.empty()) {
+ return boost::none;
+ }
+
/* Serialize the groups. */
JSONFormatter formatter;
std::ostringstream oss;
formatter.flush(oss);
- acl_str = oss.str();
+ return oss.str();
}