MDL-51684 badges: Make sure 'moodle/badges:viewbadges' is respected