mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge pull request #10991 from snipe/fixes/added_gate_to_requested_assets
Added access gate to the requested assets index
This commit is contained in:
commit
173ec44b9e
|
@ -861,6 +861,7 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
public function getRequestedIndex($user_id = null)
|
public function getRequestedIndex($user_id = null)
|
||||||
{
|
{
|
||||||
|
$this->authorize('index', Asset::class);
|
||||||
$requestedItems = CheckoutRequest::with('user', 'requestedItem')->whereNull('canceled_at')->with('user', 'requestedItem');
|
$requestedItems = CheckoutRequest::with('user', 'requestedItem')->whereNull('canceled_at')->with('user', 'requestedItem');
|
||||||
|
|
||||||
if ($user_id) {
|
if ($user_id) {
|
||||||
|
|
Loading…
Reference in a new issue