mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Check for overall asset delete permissions before checking to see if the user can delete that specific asset
This commit is contained in:
parent
7adfab9d9f
commit
3e8b7d9c94
|
@ -373,7 +373,10 @@ class AssetsController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->authorize('delete', Asset::class);
|
||||
|
||||
if ($asset = Asset::find($id)) {
|
||||
|
||||
$this->authorize('delete', $asset);
|
||||
|
||||
DB::table('assets')
|
||||
|
|
Loading…
Reference in a new issue