aboutsummaryrefslogtreecommitdiff
path: root/lib/filesystem/StandardFile.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-05-15 08:44:50 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-05-15 08:44:50 +0000
commitf7e75f5649318e3324bd1273e8959656b0118e29 (patch)
tree88d026ef8885ff50e3c50c3da08df0e2fb431d91 /lib/filesystem/StandardFile.php
parent3a66ef5a66a3017ee526e153a373f79373450677 (diff)
connect oer share action with configurable perms, fixes #2638
Closes #2638 Merge request studip/studip!1795
Diffstat (limited to 'lib/filesystem/StandardFile.php')
-rw-r--r--lib/filesystem/StandardFile.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php
index 371f041..4547d37 100644
--- a/lib/filesystem/StandardFile.php
+++ b/lib/filesystem/StandardFile.php
@@ -294,7 +294,11 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface
'link-to-clipboard'
);
}
- if ($this->isEditable($GLOBALS['user']->id) && Config::get()->OERCAMPUS_ENABLED) {
+ if (
+ $this->isEditable($GLOBALS['user']->id)
+ && Config::get()->OERCAMPUS_ENABLED
+ && $GLOBALS['perm']->have_perm(Config::get()->OER_PUBLIC_STATUS)
+ ) {
$actionMenu->addLink(
URLHelper::getURL('dispatch.php/file/share_oer/' . $this->fileref->id),
_('Im OER Campus veröffentlichen'),