Skip to content

Commit

Permalink
MDL-33933 mod_forum: fix incorrect capability check
Browse files Browse the repository at this point in the history
  • Loading branch information
steelej authored and danpoltawski committed Oct 2, 2012
1 parent 2cbbf5d commit bda4878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/forum/lib.php
Expand Up @@ -5322,7 +5322,7 @@ function forum_user_can_see_post($forum, $discussion, $post, $user=NULL, $cm=NUL


return (($userfirstpost !== false && (time() - $userfirstpost >= $CFG->maxeditingtime)) || return (($userfirstpost !== false && (time() - $userfirstpost >= $CFG->maxeditingtime)) ||
$firstpost->id == $post->id || $post->userid == $user->id || $firstpost->userid == $user->id || $firstpost->id == $post->id || $post->userid == $user->id || $firstpost->userid == $user->id ||
has_capability('mod/forum:viewqandawithoutposting', $modcontext, $user->id, false)); has_capability('mod/forum:viewqandawithoutposting', $modcontext, $user->id));
} }
return true; return true;
} }
Expand Down

0 comments on commit bda4878

Please sign in to comment.