mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
Merge remote-tracking branch 'skodak/w03_MDL-30891_m23_repository'
This commit is contained in:
commit
69136724f6
1 changed files with 5 additions and 1 deletions
|
@ -869,7 +869,11 @@ abstract class repository {
|
|||
}
|
||||
if ($record->repositorytype == 'coursefiles') {
|
||||
// coursefiles plugin needs managefiles permission
|
||||
if (!empty($current_context)) {
|
||||
$capability = $capability && has_capability('moodle/course:managefiles', $current_context);
|
||||
} else {
|
||||
$capability = $capability && has_capability('moodle/course:managefiles', get_system_context());
|
||||
}
|
||||
}
|
||||
if ($is_supported && $capability) {
|
||||
$repositories[$repository->id] = $repository;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue