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

fix #2033

Closes #2033

Merge request studip/studip!1805
parent bc2ba413
No related branches found
No related tags found
No related merge requests found
......@@ -371,9 +371,10 @@ class StructuralElement extends \SimpleORMap
*/
public function hasEditingPermission($user): bool
{
$unit = $unit = $this->findUnit();
return $GLOBALS['perm']->have_perm('root', $user->id)
|| $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,
$user->id
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment