Cheers בכרטיס המשתמש לא "מכבד" את הגדרות הנראות לקבוצה

סיכום מבוסס בינה מלאכותית

The issue concerns the ‘Cheers’ feature in user cards and profiles not respecting group visibility settings for leaderboards. jrgong reports that when a leaderboard is restricted to a specific group, users outside that group can still see the Cheers in the user card and profile, with a link to an invalid page. A workaround using CSS is suggested to hide the Cheers for non-allowed users. j.jaffeux adds that the behavior is awkward because gamification defaults to the first leaderboard, so the issue only occurs if a restricted leaderboard is not the first one.

שלבי שחזור:

  1. הגבל את לוח התוצאות לקבוצה ספציפית
  2. התחבר כמשתמש מהקבוצה
  3. ה-“Cheers” בכרטיס המשתמש ובפרופיל המשתמש מוצגים וקישור לוח התוצאות מוביל לדף לא תקין

התנהגות צפויה תהיה לא להציג את ה-“Cheers” בכרטיס המשתמש או בפרופיל המשתמש למשתמשים שלא נוספו להגדרת “גלוי לקבוצות” של לוח התוצאות

לייק 1

כפתרון עוקף CSS, השתמשתי ב-CSS הבא למטה. אתה יכול אפילו לעטוף CSS ספציפי “body not staff” כדי להחיל אותו רק על משתמשים רגילים ואנונימיים, כך שה-Cheers עדיין יהיו גלויים למנהלים ולמודים.

//ניקוד Cheers מוסתר בכרטיס המשתמש
.user-card-metadata-outlet.gamification-score {
    display: none;
}
//ניקוד Cheers מוסתר בפרופיל המשתמש (אם זה אכן ה-<div> האחרון בתוך תג ה-<dl> הזה ושום פלאגין אחר או tc לא מוסיף div משלו אחריו)
body.user-summary-page #collapsed-info-panel > dl > div:last-child {
    display:none;
}

כן, זה קצת מביך כי gamification יכריז על לוח המובילים הראשון כברירת מחדל, אם היה לך לוח מובילים שני עם נראות מוגבלת, לא היית נתקל בבעיה זו.