mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
Merge branch 'bulk-operations' into sorting
This commit is contained in:
@@ -35,6 +35,11 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->call(function () {
|
||||
$this->delete_expired_shared_links();
|
||||
})->everyMinute();
|
||||
|
||||
// Run queue jobs every minute
|
||||
$schedule->command('queue:work --tries=3')
|
||||
->everyMinute()
|
||||
->withoutOverlapping();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -228,10 +228,10 @@ class EditItemsController extends Controller
|
||||
return Demo::response_204();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check shared permission
|
||||
if (!is_editor($shared)) abort(403);
|
||||
|
||||
|
||||
foreach($request->input('data') as $file){
|
||||
$unique_id = $file['unique_id'];
|
||||
|
||||
@@ -329,20 +329,21 @@ class EditItemsController extends Controller
|
||||
if (is_demo(Auth::id())) {
|
||||
return Demo::response_204();
|
||||
}
|
||||
|
||||
$to_unique_id = $request->input('to_unique_id');
|
||||
|
||||
// Check permission to upload for authenticated editor
|
||||
if ($request->user()->tokenCan('editor')) {
|
||||
// check if shared_token cookie exist
|
||||
if (!$request->hasCookie('shared_token')) abort('401');
|
||||
$to_unique_id = $request->input('to_unique_id');
|
||||
|
||||
// Get shared token
|
||||
$shared = get_shared($request->cookie('shared_token'));
|
||||
// Check permission to upload for authenticated editor
|
||||
if ($request->user()->tokenCan('editor')) {
|
||||
// check if shared_token cookie exist
|
||||
if (!$request->hasCookie('shared_token')) abort('401');
|
||||
|
||||
// Get shared token
|
||||
$shared = get_shared($request->cookie('shared_token'));
|
||||
|
||||
// Check access to requested directory
|
||||
Guardian::check_item_access($to_unique_id, $shared);
|
||||
}
|
||||
|
||||
// Check access to requested directory
|
||||
Guardian::check_item_access($to_unique_id, $shared);
|
||||
}
|
||||
// Move item
|
||||
Editor::move($request, $to_unique_id);
|
||||
|
||||
@@ -377,7 +378,7 @@ class EditItemsController extends Controller
|
||||
|
||||
$unique_id = $item['unique_id'];
|
||||
$moving_unique_id = $unique_id;
|
||||
|
||||
|
||||
|
||||
if ($item['type'] !== 'folder') {
|
||||
$file = FileManagerFile::where('unique_id', $unique_id)
|
||||
|
||||
@@ -198,6 +198,7 @@ class User extends Authenticatable
|
||||
return FileManagerFolder::with(['folders.shared', 'shared:token,id,item_id,permission,protected,expire_in'])
|
||||
->where('parent_id', 0)
|
||||
->where('user_id', $this->id)
|
||||
->orderByDesc('created_at')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user