mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Removed new checkbox selectability on users and assets - more complicated work to be done
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
9b146ae1d2
commit
c3f21d9292
|
@ -148,7 +148,6 @@ class AssetsTransformer
|
||||||
'restore' => ($asset->deleted_at!='' && Gate::allows('create', Asset::class)) ? true : false,
|
'restore' => ($asset->deleted_at!='' && Gate::allows('create', Asset::class)) ? true : false,
|
||||||
'update' => ($asset->deleted_at=='' && Gate::allows('update', Asset::class)) ? true : false,
|
'update' => ($asset->deleted_at=='' && Gate::allows('update', Asset::class)) ? true : false,
|
||||||
'delete' => ($asset->deleted_at=='' && $asset->assigned_to =='' && Gate::allows('delete', Asset::class) && ($asset->deleted_at == '')) ? true : false,
|
'delete' => ($asset->deleted_at=='' && $asset->assigned_to =='' && Gate::allows('delete', Asset::class) && ($asset->deleted_at == '')) ? true : false,
|
||||||
'selectable' => ($asset->deleted_at=='' && $asset->assigned_to =='' && Gate::allows('delete', Asset::class) && ($asset->deleted_at == '')) ? true : false,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,6 @@ class UsersTransformer
|
||||||
'delete' => $user->isDeletable(),
|
'delete' => $user->isDeletable(),
|
||||||
'clone' => (Gate::allows('create', User::class) && ($user->deleted_at == '')),
|
'clone' => (Gate::allows('create', User::class) && ($user->deleted_at == '')),
|
||||||
'restore' => (Gate::allows('create', User::class) && ($user->deleted_at != '')),
|
'restore' => (Gate::allows('create', User::class) && ($user->deleted_at != '')),
|
||||||
'selectable' => $user->isDeletable(),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$array += $permissions_array;
|
$array += $permissions_array;
|
||||||
|
|
|
@ -19,9 +19,8 @@ class AssetPresenter extends Presenter
|
||||||
{
|
{
|
||||||
$layout = [
|
$layout = [
|
||||||
[
|
[
|
||||||
'field' => 'bulk_selectable',
|
'field' => 'checkbox',
|
||||||
'checkbox' => true,
|
'checkbox' => true,
|
||||||
'formatter' => 'checkboxEnabledFormatter',
|
|
||||||
], [
|
], [
|
||||||
'field' => 'id',
|
'field' => 'id',
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
|
|
|
@ -22,9 +22,8 @@ class UserPresenter extends Presenter
|
||||||
{
|
{
|
||||||
$layout = [
|
$layout = [
|
||||||
[
|
[
|
||||||
'field' => 'bulk_selectable',
|
'field' => 'checkbox',
|
||||||
'checkbox' => true,
|
'checkbox' => true,
|
||||||
'formatter' => 'checkboxEnabledFormatter',
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'field' => 'id',
|
'field' => 'id',
|
||||||
|
|
Loading…
Reference in a new issue