fix(manager): cs fixer
All checks were successful
Cadoles/nineskeletor/pipeline/pr-master This commit looks good
All checks were successful
Cadoles/nineskeletor/pipeline/pr-master This commit looks good
This commit is contained in:
@ -10,12 +10,12 @@ class HomeController extends AbstractController
|
||||
{
|
||||
public function home(Request $request): Response
|
||||
{
|
||||
if ($request->getSession()->get('fgforceconnect')&&!$this->getUser()) {
|
||||
if ($request->getSession()->get('fgforceconnect') && !$this->getUser()) {
|
||||
return $this->redirectToRoute('app_login');
|
||||
}
|
||||
|
||||
if(!$this->getUser()) {
|
||||
dump("here");
|
||||
if (!$this->getUser()) {
|
||||
dump('here');
|
||||
|
||||
return $this->render('Home/home.html.twig', [
|
||||
'useheader' => true,
|
||||
@ -24,22 +24,25 @@ class HomeController extends AbstractController
|
||||
'maxsize' => 1000,
|
||||
]);
|
||||
}
|
||||
if ($this->getUser()->hasRole("ROLE_USER"))
|
||||
if ($this->getUser()->hasRole('ROLE_USER')) {
|
||||
return $this->redirectToRoute('app_user_home');
|
||||
}
|
||||
|
||||
if ($this->getUser()->hasRole("ROLE_MANAGER"))
|
||||
if ($this->getUser()->hasRole('ROLE_MANAGER')) {
|
||||
return $this->redirectToRoute('app_manager_home');
|
||||
|
||||
if ($this->getUser()->hasRole("ROLE_MASTER"))
|
||||
}
|
||||
|
||||
if ($this->getUser()->hasRole('ROLE_MASTER')) {
|
||||
return $this->redirectToRoute('app_master_home');
|
||||
}
|
||||
|
||||
if ($this->getUser()->hasRole("ROLE_MODO"))
|
||||
if ($this->getUser()->hasRole('ROLE_MODO')) {
|
||||
return $this->redirectToRoute('app_modo_home');
|
||||
}
|
||||
|
||||
if ($this->getUser()->hasRole("ROLE_ADMIN"))
|
||||
if ($this->getUser()->hasRole('ROLE_ADMIN')) {
|
||||
return $this->redirectToRoute('app_admin_home');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function homeuser($access): Response
|
||||
@ -77,7 +80,6 @@ class HomeController extends AbstractController
|
||||
return $this->redirectToRoute('app_admin_config');
|
||||
}
|
||||
|
||||
|
||||
public function docrest(): Response
|
||||
{
|
||||
return $this->render('Home/docrest.html.twig', [
|
||||
|
Reference in New Issue
Block a user