Skip to content

Commit

Permalink
MDL-15941 block view permissions override regression fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Aug 6, 2008
1 parent dc633c9 commit 44df8fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blocks/moodleblock.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ function user_can_addto(&$page) {
}

function get_extra_capabilities() {
return array();
return array('moodle/block:view');
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/accesslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3365,8 +3365,8 @@ function fetch_context_capabilities($context) {

$SQL = "SELECT *
FROM {capabilities}
WHERE contextlevel = ".CONTEXT_MODULE."
AND component = :component
WHERE (contextlevel = ".CONTEXT_MODULE."
AND component = :component)
$extra";
$params['component'] = "mod/$module->name";
break;
Expand Down

0 comments on commit 44df8fa

Please sign in to comment.