Skip to content
Snippets Groups Projects
Commit 16ac35c3 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #12014 TIME 0:40 fix folder out of perimeter bugs

parent 1d872c1d
No related branches found
No related tags found
No related merge requests found
......@@ -226,7 +226,7 @@ class FolderController
if ($folder[0]['parent_id'] != $data['parent_id']) {
$childrenInPerimeter = FolderController::areChildrenInPerimeter(['folderId' => $aArgs['id']]);
if ($childrenInPerimeter) {
if ($childrenInPerimeter || $folder[0]['user_id'] == $GLOBALS['id']) {
FolderModel::update([
'set' => [
'parent_id' => $data['parent_id'],
......@@ -792,7 +792,7 @@ class FolderController
}
$folders = FolderModel::getWithEntities([
'select' => ['count(1)'],
'select' => ['count(distinct folders.id)'],
'where' => ['folders.id in (?)', '(user_id = ? OR entity_id in (?))'],
'data' => [$args['folders'], $args['userId'], $entities]
]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment