# 用户无法查看邀请详情

**URL:** <https://meta.discourse.org/t/users-are-unable-to-see-invite-details/400775>\
**Category:** Bug\
**Tags:** invites\
**Created:** [2026 年4 月 16 日 08:54 UTC](https://meta.discourse.org/t/users-are-unable-to-see-invite-details/400775 "2026-04-16T08:54:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

作者： ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
发布日期： [2026 年4 月 16 日 08:54 UTC](https://meta.discourse.org/t/users-are-unable-to-see-invite-details/400775/1 "2026-04-16T08:54:44Z")

</div>

问题：用户无法查看邀请详情标签页，仅工作人员可以查看

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/0/4/a04e192790d2c15ac97478ec1a8468211a7845b7.png)

原因 [discourse/frontend/discourse/app/routes/user-invited.js at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/frontend/discourse/app/routes/user-invited.js#L6-L12C8)

```js
    const can_see_invite_details =
      this.currentUser.staff ||
      this.controllerFor("user").id === this.currentUser?.id;

    controller.setProperties({
      can_see_invite_details,
    });

```

此处不存在 `this.controllerFor("user")`，应改为 `this.modelFor("user")`。

---

<div class="post-metadata">

作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
发布日期： [2026 年4 月 16 日 16:58 UTC](https://meta.discourse.org/t/users-are-unable-to-see-invite-details/400775/2 "2026-04-16T16:58:41Z")

</div>

感谢报告，这将修复它！

> <https://github.com/discourse/discourse/pull/39319>
>
> \`this.controllerFor("user").id\` doesn't exist so this fails and users can't see …their invite details unless they're staff. This switches to \`modelFor\` to correct it, and adds an acceptance test to avoid future regressions.

---

<div class="post-metadata">

作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
发布日期： [2026 年4 月 20 日 22:00 UTC](https://meta.discourse.org/t/users-are-unable-to-see-invite-details/400775/3 "2026-04-20T22:00:26Z")

</div>

此主题已在 16 小时后自动关闭。不再允许新回复。
