After revoking a user’s badges from admin panel the badges are reassigned to that user. Is their any way to stop reassigning of that badge to user when it has been revoked by the admin?
AI 生成的摘要
A user, Mohit_Gupta, is experiencing an issue where a user’s badges reappear after being revoked by an admin. riking and Stephen explain that badges are awarded by scheduled queries, and revocation only applies until the query runs again. If the conditions to award the badge remain true, the badge will continue to be awarded.
Mohit_Gupta is trying to prevent this for badges that can be granted multiple times and is looking for a way to set a property to stop the reassignment. Stephen suggests that the badge will continue to be awarded if the conditions remain true, and sam recommends manually revoking badges by not specifying a badge query or bypassing the badges that have been revoked. Mohit_Gupta proposes adding a column to the badges table to indicate if a badge has been revoked by a user to prevent it from being regranted.
Which badges are you trying to revoke? It won’t work too well if it’s an automatic badge..
@riking Is their any any property that I can set to prevent it from happening. I am trying it for badges that can be granted multiple times.
Badges aren’t event-driven though, right? They’re awarded by scheduled queries. You can see the scheduled job at /sidekiq/scheduler
So if the conditions to award that badge remain true, whether once or multiple times, then revocation will only apply until the query runs again. If you revoke the first instance of a badge which can be awarded multiple times then every instance of the condition which awards the badge will continue to trigger badges to be awarded.
Which badge are you trying to revoke and why?
@steve_pd I was thinking of developing a scenario where a user can get rewarded for a badge that he earns. The process will be very simple to understand in case of multiple badges if I can revoke the badge that it has been cashed in.
I was thinking of having a column in the badges table that indicates the badge has been revoked by the user and prevent it from regranting.
We support manually revoked badges just don’t specify a badge query, or have your badge query somehow bypass the badges you revoke if there is some sort of record in the db that denotes why you did it.