mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Disallow deleting in the API view if there are things checked out
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
8183b8deba
commit
79ff6a8fc2
|
@ -56,7 +56,7 @@ class LicensesTransformer
|
|||
'checkin' => Gate::allows('checkin', License::class),
|
||||
'clone' => Gate::allows('create', License::class),
|
||||
'update' => Gate::allows('update', License::class),
|
||||
'delete' => Gate::allows('delete', License::class),
|
||||
'delete' => (Gate::allows('delete', License::class) && ($license->seats == $license->availCount()->count())) ? true : false,
|
||||
];
|
||||
|
||||
$array += $permissions_array;
|
||||
|
|
Loading…
Reference in a new issue