Skip to content

Commit 4416ec7

Browse files
committed
Fix permissions check
1 parent 5d5cedf commit 4416ec7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Resources/LibraryItemResource.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,17 @@ public static function table(Table $table): Table
293293
->toolbarActions([
294294
BulkActionGroup::make([
295295
DeleteBulkAction::make()
296-
->visible(fn (): bool => auth()->user() && auth()->user()->can('delete', LibraryItem::class))
296+
->visible(fn (): bool => auth()->user() && auth()->user()->can('deleteAny', LibraryItem::class))
297297
->successRedirectUrl(function () {
298298
// For bulk actions, redirect to current folder (maintain current location)
299299
$currentParent = request()->get('parent');
300300

301301
return static::getUrl('index', $currentParent ? ['parent' => $currentParent] : []);
302302
}),
303303
RestoreBulkAction::make()
304-
->visible(fn (): bool => auth()->user() && auth()->user()->can('delete', LibraryItem::class)),
304+
->visible(fn (): bool => auth()->user() && auth()->user()->can('restoreAny', LibraryItem::class)),
305305
ForceDeleteBulkAction::make()
306-
->visible(fn (): bool => auth()->user() && auth()->user()->can('delete', LibraryItem::class))
306+
->visible(fn (): bool => auth()->user() && auth()->user()->can('forceDeleteAny', LibraryItem::class))
307307
->successRedirectUrl(function () {
308308
// For bulk actions, redirect to current folder (maintain current location)
309309
$currentParent = request()->get('parent');

0 commit comments

Comments
 (0)