diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2025-11-07 10:41:09 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2025-11-07 10:41:09 +0000 |
| commit | ad63fbd0fe6f28b5b8d4939454e1cd623784af47 (patch) | |
| tree | 4d7076f3c333a7f4ddf6f11df6091e4589d3713d /lib | |
| parent | 8d4ec6f437e720ddf4d7355d3193b9fa3b05c29d (diff) | |
Resolve "Der OER_PUBLIC_STATUS wird nicht überall respektiert"
Closes #6031
Merge request studip/studip!4596
(cherry picked from commit 5081d774b076867eada91bad5b60c88a8481da1c)
f7e2beaf re #6031 : respect OER_PUBLIC_STATUS
Co-authored-by: Rasmus Fuhse <fuhse@data-quest.de>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/filesystem/StandardFile.php | 1 | ||||
| -rw-r--r-- | lib/navigation/StartNavigation.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 4b3576b..f9978dc 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -315,6 +315,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface !$this->isEditable($GLOBALS['user']->id) && in_array($this->fileref->content_terms_of_use_id, ['SELFMADE_NONPUB', 'FREE_LICENSE']) && $this->fileref->folder->range_type === 'course' + && $GLOBALS['perm']->have_perm(Config::get()->OER_PUBLIC_STATUS) ) { $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id), diff --git a/lib/navigation/StartNavigation.php b/lib/navigation/StartNavigation.php index 6f95971..111d3b6 100644 --- a/lib/navigation/StartNavigation.php +++ b/lib/navigation/StartNavigation.php @@ -247,7 +247,7 @@ class StartNavigation extends Navigation $this->addSubNavigation('contents', $navigation); // oer - if (Config::get()->OERCAMPUS_ENABLED) { + if (Config::get()->OERCAMPUS_ENABLED && $perm->have_perm(Config::get()->OER_PUBLIC_STATUS)) { $this->addSubNavigation('oer', new Navigation(_('OER Campus'), 'dispatch.php/oer/market')); } |
