Skip to content
Snippets Groups Projects
Commit 600ca064 authored by Ron Lucke's avatar Ron Lucke Committed by David Siegfried
Browse files

fix #2033

Closes #2033

Merge request studip/studip!1805
parent cf19fe28
No related branches found
No related tags found
No related merge requests found
...@@ -371,9 +371,10 @@ class StructuralElement extends \SimpleORMap ...@@ -371,9 +371,10 @@ class StructuralElement extends \SimpleORMap
*/ */
public function hasEditingPermission($user): bool public function hasEditingPermission($user): bool
{ {
$unit = $unit = $this->findUnit();
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] ?? 'tutor', $unit->config['editing_permission'],
$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.
Finish editing this message first!
Please register or to comment