From: Kefu Chai Date: Thu, 16 Nov 2017 04:36:31 +0000 (+0800) Subject: rgw: do not print the leading "{" for Condition X-Git-Tag: v13.0.1~95^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf7e7a7f37f5e4b55aa2669697b5550ff68663e7;p=ceph.git rgw: do not print the leading "{" for Condition so the parentheses matches. also add a space before the ending "}", so it looks better. Reported-by: Bingyin Zhang Signed-off-by: Kefu Chai --- diff --git a/src/rgw/rgw_iam_policy.cc b/src/rgw/rgw_iam_policy.cc index dd11af883dd5..2606765369ae 100644 --- a/src/rgw/rgw_iam_policy.cc +++ b/src/rgw/rgw_iam_policy.cc @@ -1205,13 +1205,13 @@ ostream& print_dict(ostream& m, Iterator begin, Iterator end) { } ostream& operator <<(ostream& m, const Condition& c) { - m << "{ " << condop_string(c.op); + m << condop_string(c.op); if (c.ifexists) { m << "IfExists"; } m << ": { " << c.key; print_array(m, c.vals.cbegin(), c.vals.cend()); - return m << "}"; + return m << " }"; } Effect Statement::eval(const Environment& e,