Skip to content
Browse files

MDL-39570 mod_feedback - Missing privilege check

  • Loading branch information...
1 parent 1edad3f commit 5832a8f73788a665781cbebbe43d51a4e95f9b9a @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
@@ -416,7 +416,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 5832a8f

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