Skip to content

Commit

Permalink
fix condition, otherwise blocks folders
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 committed Sep 19, 2024
1 parent 7738441 commit 134e4d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Admin/DataObject/DataObjectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,7 @@ public function copyAction(Request $request): JsonResponse
}

$user = Tool\Admin::getCurrentUser();
if ($target->isAllowed('create') && $source instanceof DataObject\Concrete && $user->isAllowed($source->getClassId(), 'class')) {
if ($target->isAllowed('create') && ($source instanceof DataObject\Concrete ? $user->isAllowed($source->getClassId(), 'class') : true)) {
$source = DataObject::getById($sourceId);
if ($source != null) {
if ($source instanceof DataObject\Concrete && $latestVersion = $source->getLatestVersion()) {
Expand Down

0 comments on commit 134e4d3

Please sign in to comment.