mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 11:43:47 -08:00
Stop asset acceptances from shown to user if full company support is enabled and companies not match
This commit is contained in:
parent
924f5287f7
commit
9ca163e8cf
|
@ -69,7 +69,7 @@ class AcceptanceController extends Controller
|
|||
}
|
||||
|
||||
if (! Company::isCurrentUserHasAccess($acceptance->checkoutable)) {
|
||||
return redirect()->route('account.accept')->with('error', trans('general.insufficient_permissions'));
|
||||
return redirect()->route('account.accept')->with('error', trans('general.error_user_company'));
|
||||
}
|
||||
|
||||
return view('account/accept.create', compact('acceptance'));
|
||||
|
|
|
@ -452,6 +452,7 @@ return [
|
|||
'serial_number' => 'Serial Number',
|
||||
'item_notes' => ':item Notes',
|
||||
'item_name_var' => ':item Name',
|
||||
'error_user_company' => 'User and Asset companies missmatch',
|
||||
'importer' => [
|
||||
'checked_out_to_fullname' => 'Checked Out to: Full Name',
|
||||
'checked_out_to_first_name' => 'Checked Out to: First Name',
|
||||
|
|
|
@ -41,9 +41,11 @@
|
|||
<tbody>
|
||||
@foreach ($acceptances as $acceptance)
|
||||
<tr>
|
||||
@if ($acceptance->checkoutable)
|
||||
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }}</td>
|
||||
<td><a href="{{ route('account.accept.item', $acceptance) }}" class="btn btn-default btn-sm">{{ trans('general.accept_decline') }}</a></td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue