Skip to content

Commit

Permalink
MDL-80268 badges: require capability to view awarded badges.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden authored and HuongNV13 committed Dec 4, 2023
1 parent acb2ce4 commit 031220a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions badges/recipients.php
Expand Up @@ -54,6 +54,8 @@
$context = $badge->get_context();
$navurl = new moodle_url('/badges/index.php', array('type' => $badge->type));

require_capability('moodle/badges:viewawarded', $context);

if ($badge->type == BADGE_TYPE_COURSE) {
if (empty($CFG->badges_allowcoursebadges)) {
print_error('coursebadgesdisabled', 'badges');
Expand Down

0 comments on commit 031220a

Please sign in to comment.