Optimize vehicle controller by removing unnecessary acl generator

This commit is contained in:
Kendrick Chan 2018-01-13 00:27:24 +08:00
parent 5611a80565
commit 1fefaf4b09

View file

@ -11,19 +11,8 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use App\Menu\Generator as MenuGenerator;
use App\Access\Generator as ACLGenerator;
class VehicleController extends BaseController
{
protected $acl_gen;
public function __construct(MenuGenerator $menu_gen, ACLGenerator $acl_gen)
{
$this->acl_gen = $acl_gen;
parent::__construct($menu_gen);
}
public function index()
{
$this->denyAccessUnlessGranted('vehicle.list', null, 'No access.');