Skip to content

Commit

Permalink
Fix permission check for creating new slides
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Mar 18, 2022
1 parent 5046fcc commit bed4719
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bed4719

Please sign in to comment.