mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-12 13:44:54 +01:00
add own permission for deleting plugins
This commit is contained in:
parent
c09a52ee3c
commit
e7dd59b4d1
@ -180,7 +180,7 @@ class PluginResource extends Resource
|
|||||||
}),
|
}),
|
||||||
Action::make('delete')
|
Action::make('delete')
|
||||||
->label(trans('filament-actions::delete.single.label'))
|
->label(trans('filament-actions::delete.single.label'))
|
||||||
->authorize(fn (Plugin $plugin) => user()?->can('create', $plugin))
|
->authorize(fn (Plugin $plugin) => user()?->can('delete', $plugin))
|
||||||
->icon('tabler-trash')
|
->icon('tabler-trash')
|
||||||
->color('danger')
|
->color('danger')
|
||||||
->requiresConfirmation()
|
->requiresConfirmation()
|
||||||
|
|||||||
@ -56,6 +56,7 @@ class Role extends BaseRole
|
|||||||
'viewList',
|
'viewList',
|
||||||
'create',
|
'create',
|
||||||
'update',
|
'update',
|
||||||
|
'delete',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user