diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 43707a46c2..5c32d25b11 100755 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -984,7 +984,7 @@ class UsersController extends Controller */ public function printInventory($id) { - + $this->authorize('view', User::class); $show_user = User::where('id',$id)->withTrashed()->first(); $assets = Asset::where('assigned_to', $id)->where('assigned_type', User::class)->with('model', 'model.category')->get(); $licenses = $show_user->licenses()->get(); diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 1cfe22cf7f..0a79aa27f1 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -237,37 +237,45 @@
{{ trans('admin/users/general.edit') }}
+ @endcan + + @can('create', $user)
{{ trans('admin/users/general.clone') }}
+ @endcan + + @can('view', $user)
{{ trans('admin/users/general.print_assigned') }}
- - @can('delete', $user) - @if ($user->deleted_at=='') -
-
- {{csrf_field()}} - {{ method_field("DELETE")}} - -
-
-
-
- - - - -
-
- @else -
- {{ trans('button.restore') }} -
- @endif - @endcan @endcan + + @can('delete', $user) + @if ($user->deleted_at=='') +
+
+ {{csrf_field()}} + {{ method_field("DELETE")}} + +
+
+
+
+ + + + +
+
+ @else +
+ {{ trans('button.restore') }} +
+ @endif + @endcan + +