mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
rgw/notification: Filter topic list based on uid on radosgw-admin
Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
This commit is contained in:
parent
a17a33f97e
commit
2547d27b4b
@ -76,7 +76,7 @@ following command:
|
||||
|
||||
.. prompt:: bash #
|
||||
|
||||
radosgw-admin topic list [--tenant={tenant}]
|
||||
radosgw-admin topic list [--tenant={tenant}] [--uid={user}]
|
||||
|
||||
|
||||
Fetch the configuration of a specific topic by running the following command:
|
||||
|
@ -10511,6 +10511,16 @@ next:
|
||||
cerr << "ERROR: could not get topics: " << cpp_strerror(-ret) << std::endl;
|
||||
return -ret;
|
||||
}
|
||||
if (!rgw::sal::User::empty(user)) {
|
||||
for (auto it = result.topics.cbegin(); it != result.topics.cend();) {
|
||||
const auto& topic = it->second;
|
||||
if (user->get_id() != topic.user) {
|
||||
result.topics.erase(it++);
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
encode_json("result", result, formatter.get());
|
||||
formatter->flush(cout);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user