Skip to content

Commit

Permalink
MDL-10635 fixed incorrect capability value check in has_capability_in…
Browse files Browse the repository at this point in the history
…cluding_child_contetxt()
  • Loading branch information
skodak committed Aug 26, 2007
1 parent 5cfbec3 commit dda6370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/accesslib.php
Expand Up @@ -415,7 +415,7 @@ function has_capability_including_child_contexts($context, $capabilitynames) {
if ($children = get_child_contexts($context)) {
foreach ($capabilitynames as $capname) {
foreach ($children as $child) {
if (isset($USER->capabilities[$child][$capname]) and $USER->capabilities[$child][$capname] == CAP_ALLOW) {
if (isset($USER->capabilities[$child][$capname]) and $USER->capabilities[$child][$capname] > 0) {
// extra check for inherited prevent and prohibit
if (has_capability($capname, get_context_instance_by_id($child), $USER->id, false)) {
return true;
Expand Down

0 comments on commit dda6370

Please sign in to comment.