mirror of
https://github.com/ceph/ceph
synced 2025-02-16 15:27:47 +00:00
Merge pull request #53073 from kchheda3/wip-filter-noti-uid
rgw/notification: Filter topic list based on uid reviewed-by: yuvalif
This commit is contained in:
commit
f53f3aeba9
@ -78,7 +78,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:
|
||||
|
@ -10517,6 +10517,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