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

FEAT #12014 TIME 0:10 only sharing folders users have edition rights to

parent 994c1b54
No related branches found
No related tags found
No related merge requests found
...@@ -264,11 +264,6 @@ class FolderController ...@@ -264,11 +264,6 @@ class FolderController
return $response->withStatus(400)->withJson(['errors' => 'Body sharing/entities does not exists']); return $response->withStatus(400)->withJson(['errors' => 'Body sharing/entities does not exists']);
} }
$childrenInPerimeter = FolderController::areChildrenInPerimeter(['folderId' => $aArgs['id']]);
if (!$childrenInPerimeter) {
return $response->withStatus(400)->withJson(['errors' => 'Cannot share/unshare folder because at least one folder is out of your perimeter']);
}
DatabaseModel::beginTransaction(); DatabaseModel::beginTransaction();
$sharing = FolderController::folderSharing(['folderId' => $aArgs['id'], 'public' => $data['public'], 'sharing' => $data['sharing']]); $sharing = FolderController::folderSharing(['folderId' => $aArgs['id'], 'public' => $data['public'], 'sharing' => $data['sharing']]);
if (!$sharing) { if (!$sharing) {
......
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