mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-27 14:39:49 -08:00
7b33f95e83
* Check for empty headers in import * Added import permission * Fixed model path in docblock * Added import gate to default blade * Check if the user is an admin OR idf they have import permissions * Walked back that admin permission Since admins are bound by full company support, it makes less sense to let admins have this permission by default, versus having them specifically designated to the import permission
21 lines
469 B
PHP
21 lines
469 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Http\Transformers\ImportsTransformer;
|
|
use App\Models\Import;
|
|
use Illuminate\Http\Request;
|
|
use App\Models\Asset;
|
|
|
|
|
|
class ImportsController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$this->authorize('import');
|
|
$imports = Import::latest()->get();
|
|
$imports = (new ImportsTransformer)->transformImports($imports);
|
|
return view('importer/import')->with('imports', $imports);
|
|
}
|
|
}
|