# Ser capaz de alterar manualmente o status do emblema para “não concedível”

**URL:** <https://meta.discourse.org/t/be-able-to-manually-change-badge-status-to-not-grantable/296645>\
**Category:** Feature\
**Tags:** badges\
**Created:** [Fevereiro 25, 2024, 9:06am UTC](https://meta.discourse.org/t/be-able-to-manually-change-badge-status-to-not-grantable/296645 "2024-02-25T09:06:14Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [Fevereiro 18, 2026, 3:14pm UTC](https://meta.discourse.org/t/be-able-to-manually-change-badge-status-to-not-grantable/296645/12 "2026-02-18T15:14:43Z")

</div>

Ah, receio que esta solução alternativa não funcione mais. 😢

Houve uma alteração há um tempo:

> <https://github.com/discourse/discourse/commit/aa33eaa79826c81404cf7bd53c81aee788f30001>
>
> Previously, badges with custom SQL queries were hidden from the manual
> grant dro…pdown in the admin UI. This was because \`manually\_grantable?\`
> returned false for any badge with a query, regardless of whether it was
> a system badge or not.
> 
> This fix simplifies the logic: only system badges (the built-in
> Discourse badges like "Basic User", "Member", etc.) are excluded from
> manual granting. Custom badges with SQL queries can now be manually
> granted to users.
> 
> Additionally, manually granted badges are now protected from
> auto-revocation. When a badge's SQL query runs via backfill, it will
> only revoke badges that were originally auto-granted (granted\_by\_id =
> \-1), leaving manually granted badges intact. This ensures that an
> admin's deliberate decision to grant a badge isn't undone by the
> automated badge system.
> 
> We considered adding a new \`allow\_manual\_grant\` setting per badge, which
> would give admins explicit control over dropdown visibility. However,
> this adds UI complexity and another knob to configure. The simpler
> approach covers the common case: if you created a custom badge, you
> probably want the option to grant it manually.
> 
> Note: Some users may have been relying on the old behavior to hide
> badges from the dropdown by adding a dummy SQL query. This workaround
> will no longer work - those badges will now appear in the dropdown.
> 
> Ref - t/139277
> Ref - https://meta.discourse.org/t/296645

Eles fizeram referência a este tópico na mensagem do commit, mas infelizmente não atualizaram aqui.

---

_[View the full topic](https://meta.discourse.org/t/be-able-to-manually-change-badge-status-to-not-grantable/296645)._
