Merge pull request #11604 from snipe/fixes/only_show_requested_if_requestable_perms

Hide requested assets if the user cannot see requestable items
This commit is contained in:
snipe 2022-08-02 11:49:22 -07:00 committed by GitHub
commit 688577c1ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -316,11 +316,14 @@
{{ trans('general.viewassets') }} {{ trans('general.viewassets') }}
</a></li> </a></li>
@can('viewRequestable', \App\Models\Asset::class)
<li {!! (Request::is('account/requested') ? ' class="active"' : '') !!}> <li {!! (Request::is('account/requested') ? ' class="active"' : '') !!}>
<a href="{{ route('account.requested') }}"> <a href="{{ route('account.requested') }}">
<i class="fas fa-check fa-disk fa-fw" aria-hidden="true"></i> <i class="fas fa-check fa-disk fa-fw" aria-hidden="true"></i>
{{ trans('general.requested_assets_menu') }} {{ trans('general.requested_assets_menu') }}
</a></li> </a></li>
@endcan
<li {!! (Request::is('account/accept') ? ' class="active"' : '') !!}> <li {!! (Request::is('account/accept') ? ' class="active"' : '') !!}>
<a href="{{ route('account.accept') }}"> <a href="{{ route('account.accept') }}">
<i class="fas fa-check fa-disk fa-fw"></i> <i class="fas fa-check fa-disk fa-fw"></i>