From 1210dae10589515d6f3824c75639342c5e1d52dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 2 Oct 2015 14:51:41 +0200 Subject: [PATCH] remove old implementation for login/register/recover --- app/AppKernel.php | 1 + app/config/config.yml | 2 +- app/config/routing.yml | 23 +- app/config/security.yml | 4 +- config/deploy.rb | 4 +- config/deploy/staging.rb | 2 +- src/Wallabag/ApiBundle/Entity/AccessToken.php | 2 +- src/Wallabag/ApiBundle/Entity/AuthCode.php | 2 +- .../ApiBundle/Entity/RefreshToken.php | 2 +- .../CoreBundle/Command/InstallCommand.php | 2 +- .../Controller/ConfigController.php | 2 +- .../CoreBundle/Controller/RssController.php | 8 +- .../Controller/SecurityController.php | 153 --------- .../DataFixtures/ORM/LoadUserData.php | 4 +- src/Wallabag/CoreBundle/Entity/Config.php | 10 +- src/Wallabag/CoreBundle/Entity/Entry.php | 5 +- src/Wallabag/CoreBundle/Entity/Tag.php | 2 +- .../CoreBundle/Filter/EntryFilterType.php | 2 +- .../Form/Type/ForgotPasswordType.php | 2 +- .../CoreBundle/Form/Type/NewUserType.php | 2 +- .../Form/Type/UserInformationType.php | 2 +- .../CoreBundle/Helper/DetectActiveTheme.php | 2 +- .../UsernameRssTokenConverter.php | 4 +- .../views/themes/baggy/layout.html.twig | 2 +- .../themes/material/Security/login.html.twig | 2 +- .../views/themes/material/layout.html.twig | 3 +- .../Encoder/WallabagPasswordEncoder.php | 87 ----- .../WallabagAuthenticationProvider.php | 89 ----- .../WallabagUserPasswordValidator.php | 51 --- .../Tests/Controller/ConfigControllerTest.php | 4 +- .../Tests/Controller/RssControllerTest.php | 6 +- .../Controller/SecurityControllerTest.php | 319 ------------------ .../Tests/Helper/ContentProxyTest.php | 2 +- .../UsernameRssTokenConverterTest.php | 26 +- .../CoreBundle/Tests/WallabagCoreTestCase.php | 2 +- .../Entity/User.php | 19 +- .../Repository/UserRepository.php | 2 +- .../UserBundle/Resources/config/services.yml | 0 .../Resources/views/Default/index.html.twig | 1 + .../UserBundle/WallabagUserBundle.php | 9 + 40 files changed, 93 insertions(+), 773 deletions(-) delete mode 100644 src/Wallabag/CoreBundle/Controller/SecurityController.php delete mode 100644 src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php delete mode 100644 src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php delete mode 100644 src/Wallabag/CoreBundle/Security/Validator/WallabagUserPasswordValidator.php delete mode 100644 src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php rename src/Wallabag/{CoreBundle => UserBundle}/Entity/User.php (83%) rename src/Wallabag/{CoreBundle => UserBundle}/Repository/UserRepository.php (94%) create mode 100644 src/Wallabag/UserBundle/Resources/config/services.yml create mode 100644 src/Wallabag/UserBundle/Resources/views/Default/index.html.twig create mode 100644 src/Wallabag/UserBundle/WallabagUserBundle.php diff --git a/app/AppKernel.php b/app/AppKernel.php index 6f8c3a6d..6315fcde 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -27,6 +27,7 @@ class AppKernel extends Kernel new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(), new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(), new FOS\OAuthServerBundle\FOSOAuthServerBundle(), + new Wallabag\UserBundle\WallabagUserBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { diff --git a/app/config/config.yml b/app/config/config.yml index 3c63ded3..a4d18c6d 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -158,7 +158,7 @@ liip_theme: fos_user: db_driver: orm firewall_name: main - user_class: Wallabag\CoreBundle\Entity\User + user_class: Wallabag\UserBundle\Entity\User registration: form: type: wallabag_user_registration diff --git a/app/config/routing.yml b/app/config/routing.yml index dabb48fa..5fa28fba 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,3 +1,8 @@ +wallabag_user: + resource: "@WallabagUserBundle/Controller/" + type: annotation + prefix: / + wallabag_api: resource: "@WallabagApiBundle/Resources/config/routing.yml" prefix: / @@ -10,15 +15,15 @@ doc-api: resource: "@NelmioApiDocBundle/Resources/config/routing.yml" prefix: /api/doc -login: - pattern: /login - defaults: { _controller: WallabagCoreBundle:Security:login } - -login_check: - pattern: /login_check - -logout: - path: /logout +#login: +# pattern: /login +# defaults: { _controller: WallabagCoreBundle:Security:login } +# +#login_check: +# pattern: /login_check +# +#logout: +# path: /logout rest : type : rest diff --git a/app/config/security.yml b/app/config/security.yml index 79a07c48..d7d8c12b 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -8,7 +8,7 @@ security: providers: administrators: - entity: { class: WallabagCoreBundle:User, property: username } + entity: { class: WallabagUserBundle:User, property: username } fos_userbundle: id: fos_user.user_provider.username @@ -49,6 +49,6 @@ security: - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: ^/forgot-password, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/, roles: ROLE_USER } diff --git a/config/deploy.rb b/config/deploy.rb index be18ce5a..c2562965 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -4,8 +4,8 @@ lock '3.4.0' set :application, 'wallabag' set :repo_url, 'git@github.com:wallabag/wallabag.git' -set :ssh_user, 'ssh_user' -server 'server_ip', user: fetch(:ssh_user), roles: %w{web app db} +set :ssh_user, 'framasoft_bag' +server '78.46.248.87', user: fetch(:ssh_user), roles: %w{web app db} set :scm, :git diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index d67d7247..ccd05b4d 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -1,2 +1,2 @@ set :branch, 'v2' -set :deploy_to, '/var/www/' +set :deploy_to, '/var/www/v2.wallabag.org/web/' diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index d6cf0af5..b1f4e7de 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php @@ -25,7 +25,7 @@ class AccessToken extends BaseAccessToken protected $client; /** - * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User") + * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") */ protected $user; } diff --git a/src/Wallabag/ApiBundle/Entity/AuthCode.php b/src/Wallabag/ApiBundle/Entity/AuthCode.php index 7873d97d..81398158 100644 --- a/src/Wallabag/ApiBundle/Entity/AuthCode.php +++ b/src/Wallabag/ApiBundle/Entity/AuthCode.php @@ -25,7 +25,7 @@ class AuthCode extends BaseAuthCode protected $client; /** - * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User") + * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") */ protected $user; } diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php index 74c564b7..be2c1d2e 100644 --- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php +++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php @@ -25,7 +25,7 @@ class RefreshToken extends BaseRefreshToken protected $client; /** - * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User") + * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") */ protected $user; } diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 1bd76ae3..140fdf9e 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\NullOutput; -use Wallabag\CoreBundle\Entity\User; +use Wallabag\UserBundle\Entity\User; use Wallabag\CoreBundle\Entity\Config; class InstallCommand extends ContainerAwareCommand diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 27c323b7..ecfecc66 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\JsonResponse; use Wallabag\CoreBundle\Entity\Config; -use Wallabag\CoreBundle\Entity\User; +use Wallabag\UserBundle\Entity\User; use Wallabag\CoreBundle\Form\Type\ChangePasswordType; use Wallabag\CoreBundle\Form\Type\UserInformationType; use Wallabag\CoreBundle\Form\Type\NewUserType; diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 6121f361..023a6228 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php @@ -5,7 +5,7 @@ namespace Wallabag\CoreBundle\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use Wallabag\CoreBundle\Entity\User; +use Wallabag\UserBundle\Entity\User; use Wallabag\CoreBundle\Entity\Entry; use Pagerfanta\Adapter\DoctrineORMAdapter; use Pagerfanta\Pagerfanta; @@ -16,7 +16,7 @@ class RssController extends Controller * Shows unread entries for current user. * * @Route("/{username}/{token}/unread.xml", name="unread_rss", defaults={"_format"="xml"}) - * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") + * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter") * * @return \Symfony\Component\HttpFoundation\Response */ @@ -29,7 +29,7 @@ class RssController extends Controller * Shows read entries for current user. * * @Route("/{username}/{token}/archive.xml", name="archive_rss") - * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") + * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter") * * @return \Symfony\Component\HttpFoundation\Response */ @@ -42,7 +42,7 @@ class RssController extends Controller * Shows starred entries for current user. * * @Route("/{username}/{token}/starred.xml", name="starred_rss") - * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") + * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter") * * @return \Symfony\Component\HttpFoundation\Response */ diff --git a/src/Wallabag/CoreBundle/Controller/SecurityController.php b/src/Wallabag/CoreBundle/Controller/SecurityController.php deleted file mode 100644 index f0a7ab6d..00000000 --- a/src/Wallabag/CoreBundle/Controller/SecurityController.php +++ /dev/null @@ -1,153 +0,0 @@ -getSession(); - // get the login error if there is one - if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) { - $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR); - } else { - $error = $session->get(SecurityContext::AUTHENTICATION_ERROR); - $session->remove(SecurityContext::AUTHENTICATION_ERROR); - } - - return $this->render('WallabagCoreBundle:Security:login.html.twig', array( - // last username entered by the user - 'last_username' => $session->get(SecurityContext::LAST_USERNAME), - 'error' => $error, - )); - } - - /** - * Request forgot password: show form. - * - * @Route("/forgot-password", name="forgot_password") - * - * @Method({"GET", "POST"}) - */ - public function forgotPasswordAction(Request $request) - { - $form = $this->createForm('forgot_password'); - $form->handleRequest($request); - - if ($form->isValid()) { - $user = $this->getDoctrine()->getRepository('WallabagCoreBundle:User')->findOneByEmail($form->get('email')->getData()); - - // generate "hard" token - $user->setConfirmationToken(rtrim(strtr(base64_encode(hash('sha256', uniqid(mt_rand(), true), true)), '+/', '-_'), '=')); - $user->setPasswordRequestedAt(new \DateTime()); - - $em = $this->getDoctrine()->getManager(); - $em->persist($user); - $em->flush(); - - $message = \Swift_Message::newInstance() - ->setSubject('Reset Password') - ->setFrom($this->container->getParameter('from_email')) - ->setTo($user->getEmail()) - ->setBody($this->renderView('WallabagCoreBundle:Mail:forgotPassword.txt.twig', array( - 'username' => $user->getUsername(), - 'confirmationUrl' => $this->generateUrl('forgot_password_reset', array('token' => $user->getConfirmationToken()), true), - ))) - ; - $this->get('mailer')->send($message); - - return $this->redirect($this->generateUrl('forgot_password_check_email', - array('email' => $this->getObfuscatedEmail($user->getEmail())) - )); - } - - return $this->render('WallabagCoreBundle:Security:forgotPassword.html.twig', array( - 'form' => $form->createView(), - )); - } - - /** - * Tell the user to check his email provider. - * - * @Route("/forgot-password/check-email", name="forgot_password_check_email") - * - * @Method({"GET"}) - */ - public function checkEmailAction(Request $request) - { - $email = $request->query->get('email'); - - if (empty($email)) { - // the user does not come from the forgotPassword action - return $this->redirect($this->generateUrl('forgot_password')); - } - - return $this->render('WallabagCoreBundle:Security:checkEmail.html.twig', array( - 'email' => $email, - )); - } - - /** - * Reset user password. - * - * @Route("/forgot-password/{token}", name="forgot_password_reset") - * - * @Method({"GET", "POST"}) - */ - public function resetAction(Request $request, $token) - { - $user = $this->getDoctrine()->getRepository('WallabagCoreBundle:User')->findOneByConfirmationToken($token); - - if (null === $user) { - throw $this->createNotFoundException(sprintf('No user found with token "%s"', $token)); - } - - $form = $this->createForm(new ResetPasswordType()); - $form->handleRequest($request); - - if ($form->isValid()) { - $user->setPassword($form->get('new_password')->getData()); - - $em = $this->getDoctrine()->getManager(); - $em->persist($user); - $em->flush(); - - $this->get('session')->getFlashBag()->add( - 'notice', - 'The password has been reset successfully' - ); - - return $this->redirect($this->generateUrl('login')); - } - - return $this->render('WallabagCoreBundle:Security:reset.html.twig', array( - 'token' => $token, - 'form' => $form->createView(), - )); - } - - /** - * Get the truncated email displayed when requesting the resetting. - * - * Keeping only the part following @ in the address. - * - * @param string $email - * - * @return string - */ - protected function getObfuscatedEmail($email) - { - if (false !== $pos = strpos($email, '@')) { - $email = '...'.substr($email, $pos); - } - - return $email; - } -} diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php index 811451da..d48855da 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php @@ -1,11 +1,11 @@ user = $user; } @@ -169,11 +169,11 @@ class Config /** * Set user. * - * @param \Wallabag\CoreBundle\Entity\User $user + * @param User $user * * @return Config */ - public function setUser(\Wallabag\CoreBundle\Entity\User $user = null) + public function setUser(User $user = null) { $this->user = $user; @@ -183,7 +183,7 @@ class Config /** * Get user. * - * @return \Wallabag\CoreBundle\Entity\User + * @return User */ public function getUser() { diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 9e81ba12..f6206a09 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -7,6 +7,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; use Hateoas\Configuration\Annotation as Hateoas; use JMS\Serializer\Annotation\XmlRoot; +use Wallabag\UserBundle\Entity\User; /** * Entry. @@ -129,7 +130,7 @@ class Entry private $isPublic; /** - * @ORM\ManyToOne(targetEntity="User", inversedBy="entries") + * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="entries") */ private $user; @@ -142,7 +143,7 @@ class Entry /* * @param User $user */ - public function __construct(User $user) + public function __construct(Wallabag\UserBundle\Entity\User $user) { $this->user = $user; $this->tags = new ArrayCollection(); diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index 97c4579f..6067360f 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php @@ -42,7 +42,7 @@ class Tag private $entries; /** - * @ORM\ManyToOne(targetEntity="User", inversedBy="tags") + * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="tags") */ private $user; diff --git a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php index 2e6d6ff7..32de21ca 100644 --- a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php @@ -7,7 +7,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface; use Doctrine\ORM\EntityRepository; -use Wallabag\CoreBundle\Entity\User; +use Wallabag\UserBundle\Entity\User; class EntryFilterType extends AbstractType { diff --git a/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php index 9e95eb47..5614d8b2 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php @@ -39,7 +39,7 @@ class ForgotPasswordType extends AbstractType public function validateEmail($email, ExecutionContextInterface $context) { $user = $this->doctrine - ->getRepository('WallabagCoreBundle:User') + ->getRepository('WallabagUserBundle:User') ->findOneByEmail($email); if (!$user) { diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index ea7bb7ae..8aabc8bb 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -31,7 +31,7 @@ class NewUserType extends AbstractType public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( - 'data_class' => 'Wallabag\CoreBundle\Entity\User', + 'data_class' => 'Wallabag\UserBundle\Entity\User', )); } diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index e3196d9c..84f02013 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php @@ -27,7 +27,7 @@ class UserInformationType extends AbstractType public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( - 'data_class' => 'Wallabag\CoreBundle\Entity\User', + 'data_class' => 'Wallabag\UserBundle\Entity\User', )); } diff --git a/src/Wallabag/CoreBundle/Helper/DetectActiveTheme.php b/src/Wallabag/CoreBundle/Helper/DetectActiveTheme.php index 446629db..679186c0 100644 --- a/src/Wallabag/CoreBundle/Helper/DetectActiveTheme.php +++ b/src/Wallabag/CoreBundle/Helper/DetectActiveTheme.php @@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Helper; use Liip\ThemeBundle\Helper\DeviceDetectionInterface; use Symfony\Component\Security\Core\SecurityContextInterface; -use Wallabag\CoreBundle\Entity\User; +use Wallabag\UserBundle\Entity\User; /** * This class intend to detect the active theme for the logged in user. diff --git a/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php b/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php index 2771cf11..f7faa2c1 100644 --- a/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php +++ b/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php @@ -7,7 +7,7 @@ use Doctrine\Common\Persistence\ManagerRegistry; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Wallabag\CoreBundle\Entity\User; +use Wallabag\UserBundle\Entity\User; /** * ParamConverter used in the RSS controller to retrieve the right user according to @@ -49,7 +49,7 @@ class UsernameRssTokenConverter implements ParamConverterInterface $em = $this->registry->getManagerForClass($configuration->getClass()); // Check, if class name is what we need - if ('Wallabag\CoreBundle\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) { + if ('Wallabag\UserBundle\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) { return false; } diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig index 3d573eaa..de4ed2e7 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig @@ -52,7 +52,7 @@
  • {% trans %}config{% endtrans %}
  • {% trans %}about{% endtrans %}
  • -
  • {% trans %}logout{% endtrans %}
  • +
  • {% trans %}logout{% endtrans %}
  • {% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Security/login.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Security/login.html.twig index 10f380fe..b0da42ce 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Security/login.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Security/login.html.twig @@ -54,7 +54,7 @@
    - {% trans %}Forgot your password?{% endtrans %} + {% trans %}Forgot your password?{% endtrans %}
    diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index 10dede8a..36e276f9 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig @@ -46,8 +46,7 @@
  • {% trans %}tags{% endtrans %}
  • {% trans %}config{% endtrans %}
  • {% trans %}howto{% endtrans %}
  • -
  • {% trans %}About{% endtrans %}
  • -
  • {% trans %}logout{% endtrans %}
  • +
  • {% trans %}logout{% endtrans %}