mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-05 13:45:57 +00:00
clear SharedWithMe.vue view
This commit is contained in:
@@ -33,7 +33,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||
Gate::define('maintenance', fn ($user) => $user->role === 'admin');
|
||||
|
||||
// Define user ability to edit file or folder
|
||||
collect(['can-edit', 'can-visit'])
|
||||
collect(['can-edit', 'can-view'])
|
||||
->each(function ($ability) {
|
||||
Gate::define($ability, function (?User $user, File | Folder $item, ?Share $share) use ($ability) {
|
||||
// If share link exist, then check share access
|
||||
|
||||
@@ -23,7 +23,7 @@ class GetFileController extends Controller
|
||||
->where('basename', $filename)
|
||||
->firstOrFail();
|
||||
|
||||
if (! Gate::any(['can-edit', 'can-visit'], [$file, null])) {
|
||||
if (! Gate::any(['can-edit', 'can-view'], [$file, null])) {
|
||||
abort(403, 'Access Denied');
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class GetThumbnailController extends Controller
|
||||
->where('thumbnail', $filename)
|
||||
->firstOrFail();
|
||||
|
||||
if (! Gate::any(['can-edit', 'can-visit'], [$file, null])) {
|
||||
if (! Gate::any(['can-edit', 'can-view'], [$file, null])) {
|
||||
abort(403, 'Access Denied');
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class VisitorShowFileController
|
||||
->whereId($shared->item_id)
|
||||
->firstOrFail();
|
||||
|
||||
Gate::authorize('can-visit', [$file, $shared]);
|
||||
Gate::authorize('can-view', [$file, $shared]);
|
||||
|
||||
// Set access urls
|
||||
$file->setPublicUrl($shared->token);
|
||||
|
||||
Reference in New Issue
Block a user