# API с детализированными правами доступа для списка всех значков

**URL:** https://meta.discourse.org/t/api-granular-scope-to-list-all-badges/405734
**Category:** Feature
**Tags:** badges, rest-api, completed
**Created:** [20.Июнь.2026 12:03:35 UTC](https://meta.discourse.org/t/api-granular-scope-to-list-all-badges/405734 "2026-06-20T12:03:35Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [22.Июнь.2026 14:59:46 UTC](https://meta.discourse.org/t/api-granular-scope-to-list-all-badges/405734/2 "2026-06-22T14:59:46Z")

</div>

Вот оно 😉

> <https://github.com/discourse/discourse/pull/41086>
>
> Previously, listing badges over the API required either a global-scope key or di…sabling "Login required" and issuing an anonymous request, because no granular scope was mapped to the badge-listing endpoints — a problem for closed-site integrations that want to avoid global keys.
> 
> This change adds a \`badges -\> list\` scope mapped to both the public \`badges#index\` and the admin \`admin/badges#index\`, so a non-admin key can list enabled/listable badges (even on a login-required site, via the API JSON login bypass) and an admin-owned key can additionally fetch the full payload from \`/admin/badges.json\`. The admin route stays gated by \`ensure\_admin\` / \`AdminConstraint\`, so the scope grants no admin access on its own.
> 
> Meta: https://meta.discourse.org/t/api-granular-scope-to-list-all-badges/405734

---

_[View the full topic](https://meta.discourse.org/t/api-granular-scope-to-list-all-badges/405734)._
