mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 00:02:15 +00:00
prevention to get other user folder when folder upload is trying to recreate folder structure
This commit is contained in:
@@ -34,12 +34,14 @@ class GetFileParentId
|
||||
$directoryName = $directoryPath->shift();
|
||||
|
||||
// Get requested directory
|
||||
$requestedDirectory = Folder::where('name', $directoryName);
|
||||
$requestedDirectory = Folder::where('name', $directoryName)
|
||||
->where('user_id', $userId);
|
||||
|
||||
// Check if root exists, if not, create him
|
||||
if ($requestedDirectory->exists()) {
|
||||
// Get parent folder
|
||||
$parentCheck = Folder::where('name', $directoryName)
|
||||
->where('user_id', $userId)
|
||||
->where('parent_id', $parentId);
|
||||
|
||||
// Check if parent folder of requested directory name exists, if not, create it
|
||||
|
||||
Reference in New Issue
Block a user