diff options
17 files changed, 72 insertions, 28 deletions
diff --git a/.travis.yml b/.travis.yml index a8f6a744..bffa0704 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -76,5 +76,5 @@ script: | |||
76 | - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; | 76 | - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; |
77 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; | 77 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; |
78 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; | 78 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; |
79 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/FOSUserBundle/translations -v ; fi; | 79 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi; |
80 | - if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt tests; fi; | 80 | - if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt tests; fi; |
diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php new file mode 100644 index 00000000..ea2703b6 --- /dev/null +++ b/app/DoctrineMigrations/Version20161122203647.php | |||
@@ -0,0 +1,57 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Application\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Migrations\AbstractMigration; | ||
6 | use Doctrine\DBAL\Schema\Schema; | ||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | ||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | ||
9 | |||
10 | /** | ||
11 | * Methods and properties removed from `FOS\UserBundle\Model\User` | ||
12 | * | ||
13 | * - `$expired` | ||
14 | * - `$credentialsExpired` | ||
15 | * - `setExpired()` (use `setExpiresAt(\DateTime::now()` instead) | ||
16 | * - `setCredentialsExpired()` (use `setCredentialsExpireAt(\DateTime::now()` instead) | ||
17 | * | ||
18 | * You need to drop the fields `expired` and `credentials_expired` from your database | ||
19 | * schema, because they aren't mapped anymore. | ||
20 | */ | ||
21 | class Version20161122203647 extends AbstractMigration implements ContainerAwareInterface | ||
22 | { | ||
23 | /** | ||
24 | * @var ContainerInterface | ||
25 | */ | ||
26 | private $container; | ||
27 | |||
28 | public function setContainer(ContainerInterface $container = null) | ||
29 | { | ||
30 | $this->container = $container; | ||
31 | } | ||
32 | |||
33 | private function getTable($tableName) | ||
34 | { | ||
35 | return $this->container->getParameter('database_table_prefix') . $tableName; | ||
36 | } | ||
37 | |||
38 | /** | ||
39 | * @param Schema $schema | ||
40 | */ | ||
41 | public function up(Schema $schema) | ||
42 | { | ||
43 | $this->abortIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'This up migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.'); | ||
44 | |||
45 | $this->addSql('ALTER TABLE '.$this->getTable('user').' DROP expired'); | ||
46 | $this->addSql('ALTER TABLE '.$this->getTable('user').' DROP credentials_expired'); | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * @param Schema $schema | ||
51 | */ | ||
52 | public function down(Schema $schema) | ||
53 | { | ||
54 | $this->addSql('ALTER TABLE '.$this->getTable('user').' ADD expired tinyint(1) NULL DEFAULT 0'); | ||
55 | $this->addSql('ALTER TABLE '.$this->getTable('user').' ADD credentials_expired tinyint(1) NULL DEFAULT 0'); | ||
56 | } | ||
57 | } | ||
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml deleted file mode 100644 index 015989ef..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.da.yml +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Login: "Log ind" | ||
2 | Enter your email address below and we'll send you password reset instructions.: "Indtast din emailadresse nedenfor, så sender vi dig instrukser til at nulstille din adgangskode." | ||
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml deleted file mode 100644 index 944a0d41..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.de.yml +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Login: "Anmelden" | ||
2 | Enter your email address below and we'll send you password reset instructions.: "Tippe deine E-Mail-Adresse unten ein und wir senden dir die Anweisungen, wie du dein Kennwort zurücksetzen kannst." | ||
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml deleted file mode 100644 index 968eb241..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.es.yml +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Login: "Logearse" | ||
2 | Enter your email address below and we'll send you password reset instructions.: "Introduzca su dirección de email y le enviaremos las instrucciones para resetear su contraseña." | ||
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml deleted file mode 100644 index 1c5ea640..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Login: "Se connecter" | ||
2 | Enter your email address below and we'll send you password reset instructions.: "Renseignez votre adresse courriel, nous vous enverrons les instructions pour réinitialiser votre mot de passe." | ||
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml deleted file mode 100644 index b8a75172..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.oc.yml +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Login: "Se connectar" | ||
2 | Enter your email address below and we'll send you password reset instructions.: "Picatz vòstra adreça de corrièl çai-jos, vos mandarem las instruccions per reïnicializar vòstre senhal." | ||
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml deleted file mode 100644 index 7e0a2490..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pl.yml +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Login: "Logowanie" | ||
2 | Enter your email address below and we'll send you password reset instructions.: "Wpisz poniżej swój adres email, abyśmy mogli wysłać ci instrukcję resetowania hasła." | ||
diff --git a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml b/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml deleted file mode 100644 index 85eadfd8..00000000 --- a/app/Resources/FOSUserBundle/translations/FOSUserBundle.pt.yml +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Login: "Login" | ||
2 | Enter your email address below and we'll send you password reset instructions.: "Digite seu endereço de e-mail para enviarmos as instruções de recupeção de sua senha." | ||
diff --git a/app/config/config.yml b/app/config/config.yml index 487e934b..5f939ab5 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -210,6 +210,7 @@ fos_user: | |||
210 | from_email: | 210 | from_email: |
211 | address: "%from_email%" | 211 | address: "%from_email%" |
212 | sender_name: wallabag | 212 | sender_name: wallabag |
213 | |||
213 | fos_oauth_server: | 214 | fos_oauth_server: |
214 | db_driver: orm | 215 | db_driver: orm |
215 | client_class: Wallabag\ApiBundle\Entity\Client | 216 | client_class: Wallabag\ApiBundle\Entity\Client |
@@ -217,10 +218,10 @@ fos_oauth_server: | |||
217 | refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken | 218 | refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken |
218 | auth_code_class: Wallabag\ApiBundle\Entity\AuthCode | 219 | auth_code_class: Wallabag\ApiBundle\Entity\AuthCode |
219 | service: | 220 | service: |
220 | user_provider: fos_user.user_manager | 221 | user_provider: fos_user.user_provider.username_email |
221 | options: | 222 | options: |
222 | refresh_token_lifetime: 1209600 | 223 | refresh_token_lifetime: 1209600 |
223 | 224 | ||
224 | scheb_two_factor: | 225 | scheb_two_factor: |
225 | trusted_computer: | 226 | trusted_computer: |
226 | enabled: true | 227 | enabled: true |
diff --git a/composer.json b/composer.json index e2aeb424..a5ef9529 100644 --- a/composer.json +++ b/composer.json | |||
@@ -49,7 +49,7 @@ | |||
49 | "doctrine/doctrine-cache-bundle": "^1.2", | 49 | "doctrine/doctrine-cache-bundle": "^1.2", |
50 | "twig/extensions": "~1.0", | 50 | "twig/extensions": "~1.0", |
51 | "symfony/swiftmailer-bundle": "^2.3", | 51 | "symfony/swiftmailer-bundle": "^2.3", |
52 | "symfony/monolog-bundle": "^2.8", | 52 | "symfony/monolog-bundle": "^3.0", |
53 | "sensio/distribution-bundle": "^5.0", | 53 | "sensio/distribution-bundle": "^5.0", |
54 | "sensio/framework-extra-bundle": "^3.0.2", | 54 | "sensio/framework-extra-bundle": "^3.0.2", |
55 | "incenteev/composer-parameter-handler": "^2.0", | 55 | "incenteev/composer-parameter-handler": "^2.0", |
@@ -65,7 +65,7 @@ | |||
65 | "liip/theme-bundle": "~1.1", | 65 | "liip/theme-bundle": "~1.1", |
66 | "lexik/form-filter-bundle": "~5.0", | 66 | "lexik/form-filter-bundle": "~5.0", |
67 | "j0k3r/graby": "~1.0", | 67 | "j0k3r/graby": "~1.0", |
68 | "friendsofsymfony/user-bundle": "dev-master#e168ed64629d034cb9cbbffb9d4350f62ef04fab as 2.0.x-dev", | 68 | "friendsofsymfony/user-bundle": "2.0.x-dev", |
69 | "friendsofsymfony/oauth-server-bundle": "^1.5", | 69 | "friendsofsymfony/oauth-server-bundle": "^1.5", |
70 | "stof/doctrine-extensions-bundle": "^1.2", | 70 | "stof/doctrine-extensions-bundle": "^1.2", |
71 | "scheb/two-factor-bundle": "~2.0", | 71 | "scheb/two-factor-bundle": "~2.0", |
diff --git a/docs/de/developer/translate.rst b/docs/de/developer/translate.rst index 50e136ea..10544e31 100644 --- a/docs/de/developer/translate.rst +++ b/docs/de/developer/translate.rst | |||
@@ -20,7 +20,7 @@ der ISO 639-1 Code deiner Sprache ist (`siehe Wikipedia <https://en.wikipedia.or | |||
20 | Andere Dateien zum Übersetzen: | 20 | Andere Dateien zum Übersetzen: |
21 | 21 | ||
22 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations. | 22 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations. |
23 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/FOSUserBundle/translations. | 23 | - https://github.com/wallabag/wallabag/tree/master/src/Wallabag/UserBundle/Resources/translations. |
24 | 24 | ||
25 | Du musst die ``THE_TRANSLATION_FILE.CODE.yml`` Dateien erstellen. | 25 | Du musst die ``THE_TRANSLATION_FILE.CODE.yml`` Dateien erstellen. |
26 | 26 | ||
diff --git a/docs/en/developer/translate.rst b/docs/en/developer/translate.rst index d412d3e9..1e5d5009 100644 --- a/docs/en/developer/translate.rst +++ b/docs/en/developer/translate.rst | |||
@@ -20,7 +20,7 @@ is the ISO 639-1 code of your language (`see wikipedia <https://en.wikipedia.org | |||
20 | Other files to translate: | 20 | Other files to translate: |
21 | 21 | ||
22 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations. | 22 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations. |
23 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/FOSUserBundle/translations. | 23 | - https://github.com/wallabag/wallabag/tree/master/src/Wallabag/UserBundle/Resources/translations. |
24 | 24 | ||
25 | You have to create ``THE_TRANSLATION_FILE.CODE.yml`` files. | 25 | You have to create ``THE_TRANSLATION_FILE.CODE.yml`` files. |
26 | 26 | ||
diff --git a/docs/fr/developer/translate.rst b/docs/fr/developer/translate.rst index 902c29ad..870d1c20 100644 --- a/docs/fr/developer/translate.rst +++ b/docs/fr/developer/translate.rst | |||
@@ -21,7 +21,7 @@ où CODE est le code ISO 639-1 de votre langue (`cf wikipedia <https://fr.wikipe | |||
21 | Autres fichiers à traduire : | 21 | Autres fichiers à traduire : |
22 | 22 | ||
23 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations. | 23 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations. |
24 | - https://github.com/wallabag/wallabag/tree/master/app/Resources/FOSUserBundle/translations. | 24 | - https://github.com/wallabag/wallabag/tree/master/src/Wallabag/UserBundle/Resources/translations. |
25 | 25 | ||
26 | Vous devez créer les fichiers ``LE_FICHIER_DE_TRADUCTION.CODE.yml``. | 26 | Vous devez créer les fichiers ``LE_FICHIER_DE_TRADUCTION.CODE.yml``. |
27 | 27 | ||
diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php index 445edb3c..f913f52d 100644 --- a/src/Wallabag/UserBundle/Repository/UserRepository.php +++ b/src/Wallabag/UserBundle/Repository/UserRepository.php | |||
@@ -48,7 +48,7 @@ class UserRepository extends EntityRepository | |||
48 | { | 48 | { |
49 | return $this->createQueryBuilder('u') | 49 | return $this->createQueryBuilder('u') |
50 | ->select('count(u)') | 50 | ->select('count(u)') |
51 | ->andWhere('u.expired = false') | 51 | ->andWhere('u.enabled = true') |
52 | ->getQuery() | 52 | ->getQuery() |
53 | ->getSingleScalarResult(); | 53 | ->getSingleScalarResult(); |
54 | } | 54 | } |
diff --git a/src/Wallabag/UserBundle/Resources/views/Resetting/checkEmail.html.twig b/src/Wallabag/UserBundle/Resources/views/Resetting/check_email.html.twig index 66cbdc28..e9d46dcc 100644 --- a/src/Wallabag/UserBundle/Resources/views/Resetting/checkEmail.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Resetting/check_email.html.twig | |||
@@ -5,7 +5,7 @@ | |||
5 | {% block fos_user_content %} | 5 | {% block fos_user_content %} |
6 | <div class="card-content"> | 6 | <div class="card-content"> |
7 | <div class="row"> | 7 | <div class="row"> |
8 | {{ 'resetting.check_email'|trans({'%email%': email}) }} | 8 | <p>{{ 'resetting.check_email'|trans({'%tokenLifetime%': tokenLifetime}) }}</p> |
9 | </div> | 9 | </div> |
10 | </div> | 10 | </div> |
11 | {% endblock fos_user_content %} | 11 | {% endblock fos_user_content %} |
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index 9bbc5960..a28c3b6b 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | |||
@@ -592,13 +592,13 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
592 | $user = $em | 592 | $user = $em |
593 | ->getRepository('WallabagUserBundle:User') | 593 | ->getRepository('WallabagUserBundle:User') |
594 | ->findOneByUsername('empty'); | 594 | ->findOneByUsername('empty'); |
595 | $user->setExpired(1); | 595 | $user->setEnabled(false); |
596 | $em->persist($user); | 596 | $em->persist($user); |
597 | 597 | ||
598 | $user = $em | 598 | $user = $em |
599 | ->getRepository('WallabagUserBundle:User') | 599 | ->getRepository('WallabagUserBundle:User') |
600 | ->findOneByUsername('bob'); | 600 | ->findOneByUsername('bob'); |
601 | $user->setExpired(1); | 601 | $user->setEnabled(false); |
602 | $em->persist($user); | 602 | $em->persist($user); |
603 | 603 | ||
604 | $em->flush(); | 604 | $em->flush(); |
@@ -614,13 +614,13 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
614 | $user = $em | 614 | $user = $em |
615 | ->getRepository('WallabagUserBundle:User') | 615 | ->getRepository('WallabagUserBundle:User') |
616 | ->findOneByUsername('empty'); | 616 | ->findOneByUsername('empty'); |
617 | $user->setExpired(0); | 617 | $user->setEnabled(true); |
618 | $em->persist($user); | 618 | $em->persist($user); |
619 | 619 | ||
620 | $user = $em | 620 | $user = $em |
621 | ->getRepository('WallabagUserBundle:User') | 621 | ->getRepository('WallabagUserBundle:User') |
622 | ->findOneByUsername('bob'); | 622 | ->findOneByUsername('bob'); |
623 | $user->setExpired(0); | 623 | $user->setEnabled(true); |
624 | $em->persist($user); | 624 | $em->persist($user); |
625 | 625 | ||
626 | $em->flush(); | 626 | $em->flush(); |