mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
01c47d7c5d
* Add more checks to invoice test * Uploading migration file & test * Comment redundant tests * Improve tests with smaller sample files. (#3250) * Reduce migration file size to improve test velocity * minor fixes * remove xhprof ext * Tests for templates * Remove commented tests * Fix invoices testing & importing * Sending e-mail when migration fails * Uploading & storing the migration file - Added Swagger notation - Added MigrationTest.php method Co-authored-by: David Bomba <turbo124@gmail.com>
31 lines
587 B
PHP
31 lines
587 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Migration;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UploadMigrationFileRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return auth()->user()->isAdmin();
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'migration' => [], // TODO: Write mimes check for zip file.
|
|
];
|
|
}
|
|
}
|