3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-06 12:25:49 +00:00

Fixed #6349 - add view permission for print all assigned

This commit is contained in:
snipe
2018-10-19 16:46:46 -07:00
parent 2ded2ff53a
commit 20b26effdb
2 changed files with 8 additions and 1 deletions

View File

@ -613,6 +613,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();
$accessories = $show_user->accessories()->get();