Skip to content
Snippets Groups Projects
Commit 7b872489 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Ron Lucke
Browse files

prevent warning in CourseWare\StructuralElement::hasEditingPermission(), fixes #2070

Closes #2070

Merge request studip/studip!1346
parent eb09fdeb
No related branches found
No related tags found
No related merge requests found
...@@ -373,9 +373,9 @@ class StructuralElement extends \SimpleORMap ...@@ -373,9 +373,9 @@ class StructuralElement extends \SimpleORMap
*/ */
public function hasEditingPermission($user): bool public function hasEditingPermission($user): bool
{ {
return $GLOBALS['perm']->have_perm('root', $user->id) || return $GLOBALS['perm']->have_perm('root', $user->id)
$GLOBALS['perm']->have_studip_perm( || $GLOBALS['perm']->have_studip_perm(
\CourseConfig::get($this->range_id)->COURSEWARE_EDITING_PERMISSION[$this->getCoursewareCourse($this->range_id)->id], \CourseConfig::get($this->range_id)->COURSEWARE_EDITING_PERMISSION[$this->getCoursewareCourse($this->range_id)->id] ?? 'tutor',
$this->range_id, $this->range_id,
$user->id $user->id
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment