Skip to content

Commit

Permalink
Remove not required capability check.
Browse files Browse the repository at this point in the history
Fixes isse #463
  • Loading branch information
Matt Porritt committed Aug 10, 2022
1 parent 77dd8cf commit 31ab785
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,23 +252,13 @@ function hvp_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload
return false; // Invalid context.
}

// Check permissions.
if (!has_capability('mod/hvp:getcachedassets', $context)) {
return false;
}

$itemid = 0;
break;
case 'cachedassets':
if ($context->contextlevel != CONTEXT_SYSTEM) {
return false; // Invalid context.
}

// Check permissions.
if (!has_capability('mod/hvp:getcachedassets', $context)) {
return false;
}

$options['cacheability'] = 'public';
$options['immutable'] = true;

Expand Down

0 comments on commit 31ab785

Please sign in to comment.