Skip to content
Browse files

MDL-39570 mod_feedback - Missing privilege check

  • Loading branch information...
1 parent b25cd1f commit 09c2ec4303a0da820198ab589e1d26c4a6a23418 @grabs grabs committed with damyon Jul 2, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 mod/feedback/lib.php
View
7 mod/feedback/lib.php
@@ -402,7 +402,12 @@ function feedback_get_recent_mod_activity(&$activities, &$index,
return;
}
- $cm_context = context_module::instance($cm->id);
+ $cm_context = context_module::instance($cm->id);
+
+ if (!has_capability('mod/feedback:view', $cm_context)) {
+ return;
+ }
+
$accessallgroups = has_capability('moodle/site:accessallgroups', $cm_context);
$viewfullnames = has_capability('moodle/site:viewfullnames', $cm_context);
$groupmode = groups_get_activity_groupmode($cm, $course);

0 comments on commit 09c2ec4

Please sign in to comment.
Something went wrong with that request. Please try again.