# 在主题中查找发帖人的所有群组

**URL:** <https://meta.discourse.org/t/finding-all-groups-of-the-poster-in-a-topic/311377>\
**Category:** Development\
**Created:** [2024 年6 月 10 日 11:55 UTC](https://meta.discourse.org/t/finding-all-groups-of-the-poster-in-a-topic/311377 "2024-06-10T11:55:25Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![Lumi](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@Lumi](https://meta.discourse.org/u/Lumi)\
发布日期： [2024 年6 月 10 日 11:55 UTC](https://meta.discourse.org/t/finding-all-groups-of-the-poster-in-a-topic/311377/1 "2024-06-10T11:55:25Z")

</div>

我想在主题中的每个帖子（用户名下方）显示用户的所有用户组的小装饰。基本功能我已经实现了，但在查找发帖用户的用户组时遇到了困难。在 post-meta-data 小部件的 attrs 中，我可以找到一些用户详细信息，但不包括用户组。我认为我需要将用户组添加到 post 序列化器中，但我不确定如何操作。

---

_[View the full topic](https://meta.discourse.org/t/finding-all-groups-of-the-poster-in-a-topic/311377)._
