diff --git a/lib/Models/Playlists.php b/lib/Models/Playlists.php index 8f93b49d..e53501a7 100644 --- a/lib/Models/Playlists.php +++ b/lib/Models/Playlists.php @@ -406,32 +406,8 @@ public static function checkPlaylistACL($oc_playlist, $playlist) $old_acls = Helpers::filterACLs($old_acl, $acl); - $current_acl = $old_acls['studip']; - - foreach ($acl as $entry) { - $found = false; - foreach ($current_acl as $current_key => &$current_entry) { - if ($current_entry['role'] === $entry['role'] && $current_entry['action'] === $entry['action']) { - if ($found) { - // Remove duplicates - unset($current_acl[$current_key]); - continue; - } - - $found = true; - - // Ensure that allowed is true - $current_entry['allow'] = $entry['allow']; - } - } - - if (!$found) { - $current_acl[$entry['role'] . '_'. $entry['action']] = $entry; - } - } - // Reindex keys - $current_acl = array_values($current_acl); + $current_acl = array_values($old_acls['studip']); sort($current_acl); sort($acl);