Show custom badge only if user is currently a donor

This commit is contained in:
Howl 2016-09-30 21:11:45 +02:00
parent 48cef26ccd
commit c54c1565ca

View File

@ -199,7 +199,8 @@ LIMIT 1
return Err500
}
if can && show && (b.Name != "" || b.Icon != "") {
can = can && show && common.UserPrivileges(r.Privileges)&common.UserPrivilegeDonor > 0
if can && (b.Name != "" || b.Icon != "") {
r.CustomBadge = &b
}