diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-11-21 15:12:11 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-11-22 21:25:05 +0100 |
commit | 5066c3e066ad67788bdf6edac9e80cab614a2d4d (patch) | |
tree | a3e7394f4ff77bc628625dda887286afb9dcf0df | |
parent | 4da598c5df08f8a5e20c838df5de8c9e4efcb273 (diff) | |
download | wallabag-5066c3e066ad67788bdf6edac9e80cab614a2d4d.tar.gz wallabag-5066c3e066ad67788bdf6edac9e80cab614a2d4d.tar.zst wallabag-5066c3e066ad67788bdf6edac9e80cab614a2d4d.zip |
Re-use FOSUser master branch
-rw-r--r-- | app/config/config.yml | 5 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | src/Wallabag/UserBundle/Repository/UserRepository.php | 2 | ||||
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | 8 |
4 files changed, 9 insertions, 8 deletions
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..52e3235f 100644 --- a/composer.json +++ b/composer.json | |||
@@ -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/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/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(); |