mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fixed #6349 - add view permission for print all assigned
This commit is contained in:
parent
2ded2ff53a
commit
20b26effdb
|
@ -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();
|
||||
|
|
|
@ -233,12 +233,19 @@
|
|||
<div class="col-md-12">
|
||||
<a href="{{ route('users.edit', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-default hidden-print">{{ trans('admin/users/general.edit') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('create', $user)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('clone/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-default hidden-print">{{ trans('admin/users/general.clone') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('view', $user)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('users.print', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-default hidden-print">{{ trans('admin/users/general.print_assigned') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('delete', $user)
|
||||
@if ($user->deleted_at=='')
|
||||
|
@ -263,7 +270,6 @@
|
|||
</div>
|
||||
@endif
|
||||
@endcan
|
||||
@endcan
|
||||
</div>
|
||||
<!-- End button column -->
|
||||
</div> <!--/.row-->
|
||||
|
|
Loading…
Reference in a new issue