mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Fixed API gate names in tranformers for new, more granular admin stuff
This commit is contained in:
parent
097096aa24
commit
6a2fd74219
|
@ -34,8 +34,8 @@ class CategoriesTransformer
|
|||
];
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'update' => Gate::allows('admin') ? true : false,
|
||||
'delete' => Gate::allows('admin') ? true : false,
|
||||
'update' => Gate::allows('update', Category::class) ? true : false,
|
||||
'delete' => Gate::allows('delete', Category::class) ? true : false,
|
||||
];
|
||||
|
||||
$array += $permissions_array;
|
||||
|
|
|
@ -39,8 +39,8 @@ class LocationsTransformer
|
|||
];
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'update' => Gate::allows('admin') ? true : false,
|
||||
'delete' => Gate::allows('admin') ? true : false,
|
||||
'update' => Gate::allows('update', Location::class) ? true : false,
|
||||
'delete' => Gate::allows('delete', Location::class) ? true : false,
|
||||
];
|
||||
|
||||
$array += $permissions_array;
|
||||
|
|
|
@ -32,8 +32,8 @@ class StatuslabelsTransformer
|
|||
];
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'edit' => Gate::allows('admin') ? true : false,
|
||||
'delete' => Gate::allows('admin') ? true : false,
|
||||
'update' => Gate::allows('update', Statuslabel::class) ? true : false,
|
||||
'delete' => Gate::allows('delete', Statuslabel::class) ? true : false,
|
||||
];
|
||||
$array += $permissions_array;
|
||||
|
||||
|
|
Loading…
Reference in a new issue