Skip to content
Snippets Groups Projects
Commit ef07ab20 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

Revert "fix #1044"

This reverts commit 41994362.
parent 3a1e78fd
No related branches found
No related tags found
No related merge requests found
...@@ -52,19 +52,7 @@ class Authority ...@@ -52,19 +52,7 @@ class Authority
public static function canUpdateBlock(User $user, Block $resource) public static function canUpdateBlock(User $user, Block $resource)
{ {
if ($resource->isBlocked()) { if ($resource->isBlocked()) {
$structural_element = $resource->container->structural_element; return $resource->getBlockerUserId() == $user->id;
if ($structural_element->range_type === 'user') {
return $structural_element->range_id === $user->id;
}
$perm = $GLOBALS['perm']->have_studip_perm(
$structural_element->course->config->COURSEWARE_EDITING_PERMISSION,
$structural_element->course->id,
$user->id
);
return $resource->edit_blocker_id === $user->id || $perm;
} }
return self::canUpdateContainer($user, $resource->container); return self::canUpdateContainer($user, $resource->container);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment