# CORREÇÃO: review-insights têm um diálogo 404 para moderadores de categoria

**URL:** https://meta.discourse.org/t/fix-review-insights-have-a-404-dialog-for-category-moderators/392682
**Category:** Bug
**Tags:** category-moderators, review-queue
**Created:** [Janeiro 5, 2026, 6:58am UTC](https://meta.discourse.org/t/fix-review-insights-have-a-404-dialog-for-category-moderators/392682 "2026-01-05T06:58:07Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/553546_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)
#### Post date: [Janeiro 5, 2026, 6:58am UTC](https://meta.discourse.org/t/fix-review-insights-have-a-404-dialog-for-category-moderators/392682/1 "2026-01-05T06:58:07Z")

</div>

Ao adicionar um usuário como moderador de categoria ( **não moderador ou administrador** ), o usuário não recebe a permissão `staff`.

E quando eles moderam avaliações (/review), a página de insights exibe `Ocorreu um erro: Página Não Encontrada。`.

O problema é causado pela função `loadIpData()`, quando ela tenta obter `/admin/users/xxxx.json`, a permissão é negada pelo backend.

Este commit adiciona uma lógica `!this.currentUser.staff`, para excluir usuários sem permissões de staff da solicitação desta API no frontend, para que não haja um diálogo aqui.

> <https://github.com/discourse/discourse/pull/36953>
>
> When adding a user as the category moderator, the user wasn't grant the \`staff\` …permission.
> 
> And when they moderate reviews, the insight page will bump \`An error occurred: Page Not Found。\`
> 
> The issue is caused by the \`loadIpData()\` function, when it tries to get \`/admin/users/xxxx.json\`, the permission is denied by the backend.
> 
> This commit add a logic, to exclude users without staff permissions from requesting this api in frontend, so that there won't be a dialog here.
> 
> See the attachment.
> 
> \<img width="1116" height="200" alt="image" src="https://github.com/user-attachments/assets/78d1ae55-3d76-43d5-acbd-55e35597ce17" /\>

---

_[View the full topic](https://meta.discourse.org/t/fix-review-insights-have-a-404-dialog-for-category-moderators/392682)._
