1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/Http/Requests/Report/ReportPreviewRequest.php

42 lines
830 B
PHP
Raw Normal View History

2023-08-18 13:36:50 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Http\Requests\Report;
use App\Http\Requests\Request;
class ReportPreviewRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
2024-01-14 05:05:00 +01:00
public function authorize(): bool
2023-08-18 13:36:50 +02:00
{
/** @var \App\Models\User $user */
$user = auth()->user();
return $user->isAdmin() || $user->hasPermission('view_reports');
2024-01-14 05:05:00 +01:00
2023-08-18 13:36:50 +02:00
}
public function rules()
{
return [
];
}
public function prepareForValidation()
{
}
}