From b18bf7ae8327174d705f4f3352d15f4b7410cef1 Mon Sep 17 00:00:00 2001 From: Wilmer Ramones Date: Sat, 9 Jul 2016 11:02:49 -0400 Subject: [PATCH] desrenombrado el login debido a que dejo de funcionar --- app/Resources/views/login/login.html.twig | 112 ------------------------ app/Resources/views/security/login.html.twig | 112 ++++++++++++++++++++++++ src/AppBundle/Controller/LoginController.php | 55 ------------ src/AppBundle/Controller/SecurityController.php | 55 ++++++++++++ 4 files changed, 167 insertions(+), 167 deletions(-) delete mode 100644 app/Resources/views/login/login.html.twig create mode 100644 app/Resources/views/security/login.html.twig delete mode 100644 src/AppBundle/Controller/LoginController.php create mode 100644 src/AppBundle/Controller/SecurityController.php diff --git a/app/Resources/views/login/login.html.twig b/app/Resources/views/login/login.html.twig deleted file mode 100644 index 1616b1d..0000000 --- a/app/Resources/views/login/login.html.twig +++ /dev/null @@ -1,112 +0,0 @@ -{% extends 'base.html.twig' %} - - -{% block stylesheets %} - {{ parent() }} - -{% endblock %} - -{% block body %} - {% block navegacion %} - - - - - - {% endblock %} - -
-
-
-
-

Acceso al sistema CEA@UBV

- -
- -
-
-
- -
- -
- -
- {% if error %} -
{{ error.messageKey|trans(error.messageData, 'security') }}
- {% endif %} -
-
- - -
- -
- - -
- - - - - - - - - -
-
-
-
-
- -
- ¿Ingresa por Primera Vez? Aquí unas breves instrucciones: -
    -
  • - A su dirección de Correo deben haber llegado las credenciales de Acceso luego de haber solicitado Adscripción -
  • -
  • - Una vez dentro, realizará el proceso de solicitud de adscripción al CEA -
  • -
  • - Para este proceso debe tener en digital los siguientes documentos: -
      -
    1. Digital de la Constancia de Trabajo (*)
    2. -
    3. Digital del Título de Pregrado (*)
    4. -
    5. Digital del Título de Postgrado mas reciente
    6. -
    7. Digital de la Constancia de Aprobación de Concurso de Oposición
    8. -
    9. Digital de la Constancia de Aprobación de Ascensos
    10. - -
    -
  • - -
- -
-
- -
-
-
- -{% endblock %} \ No newline at end of file diff --git a/app/Resources/views/security/login.html.twig b/app/Resources/views/security/login.html.twig new file mode 100644 index 0000000..1616b1d --- /dev/null +++ b/app/Resources/views/security/login.html.twig @@ -0,0 +1,112 @@ +{% extends 'base.html.twig' %} + + +{% block stylesheets %} + {{ parent() }} + +{% endblock %} + +{% block body %} + {% block navegacion %} + + + + + + {% endblock %} + +
+
+
+
+

Acceso al sistema CEA@UBV

+ +
+ +
+
+
+ +
+ +
+ +
+ {% if error %} +
{{ error.messageKey|trans(error.messageData, 'security') }}
+ {% endif %} +
+
+ + +
+ +
+ + +
+ + + + + + + + + +
+
+
+
+
+ +
+ ¿Ingresa por Primera Vez? Aquí unas breves instrucciones: +
    +
  • + A su dirección de Correo deben haber llegado las credenciales de Acceso luego de haber solicitado Adscripción +
  • +
  • + Una vez dentro, realizará el proceso de solicitud de adscripción al CEA +
  • +
  • + Para este proceso debe tener en digital los siguientes documentos: +
      +
    1. Digital de la Constancia de Trabajo (*)
    2. +
    3. Digital del Título de Pregrado (*)
    4. +
    5. Digital del Título de Postgrado mas reciente
    6. +
    7. Digital de la Constancia de Aprobación de Concurso de Oposición
    8. +
    9. Digital de la Constancia de Aprobación de Ascensos
    10. + +
    +
  • + +
+ +
+
+ +
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/src/AppBundle/Controller/LoginController.php b/src/AppBundle/Controller/LoginController.php deleted file mode 100644 index 4c1a857..0000000 --- a/src/AppBundle/Controller/LoginController.php +++ /dev/null @@ -1,55 +0,0 @@ -get('security.authentication_utils'); - - // get the login error if there is one - $error = $authenticationUtils->getLastAuthenticationError(); - - // last username entered by the user - $lastUsername = $authenticationUtils->getLastUsername(); - - return $this->render( - 'login/login.html.twig', - array( - // last username entered by the user - 'last_username' => $lastUsername, - 'error' => $error, - ) - ); - } - - /** - * @Route("/verificar", name="user_roles") - */ - public function verificarAction(Request $request) - { - if (!$this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) { - return $this->redirect($this->generateUrl('login')); - } - - - if($this->isGranted('ROLE_DOCENTE')){ - return $this->redirect($this->generateUrl('solicitud_adscripcion')); - } - } -} \ No newline at end of file diff --git a/src/AppBundle/Controller/SecurityController.php b/src/AppBundle/Controller/SecurityController.php new file mode 100644 index 0000000..92856d2 --- /dev/null +++ b/src/AppBundle/Controller/SecurityController.php @@ -0,0 +1,55 @@ +get('security.authentication_utils'); + + // get the login error if there is one + $error = $authenticationUtils->getLastAuthenticationError(); + + // last username entered by the user + $lastUsername = $authenticationUtils->getLastUsername(); + + return $this->render( + 'security/login.html.twig', + array( + // last username entered by the user + 'last_username' => $lastUsername, + 'error' => $error, + ) + ); + } + + /** + * @Route("/verificar", name="user_roles") + */ + public function verificarAction(Request $request) + { + if (!$this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) { + return $this->redirect($this->generateUrl('login')); + } + + + if($this->isGranted('ROLE_DOCENTE')){ + return $this->redirect($this->generateUrl('solicitud_adscripcion')); + } + } +} \ No newline at end of file -- 2.0.0