From bed4719ba9cb673c3bafd4e4ce2857293c0df15b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Fri, 18 Mar 2022 14:03:53 +0100 Subject: [PATCH] Fix permission check for creating new slides --- src/Slider.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Slider.php b/src/Slider.php index 5207a88..8a48e41 100644 --- a/src/Slider.php +++ b/src/Slider.php @@ -522,17 +522,12 @@ public function slideOnloadCallback($dc) switch (Input::get('act')) { case 'paste': case 'select': + case 'create': if (!in_array(CURRENT_ID, $root)) { throw new AccessDeniedException('Not enough permissions to access slider ID ' . $id . '.'); } break; - case 'create': - if (!Input::get('pid') || !in_array(Input::get('pid'), $root)) { - throw new AccessDeniedException('Not enough permissions to create slides in slider ID ' . Input::get('pid') . '.'); - } - break; - case 'cut': case 'copy': if (Input::get('act') == 'cut' && Input::get('mode') == 1) {