diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2018-04-03 22:08:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-03 22:08:42 +0200 |
commit | 11f15430ffc67e30f084cffc8e909ace87ce19e1 (patch) | |
tree | 31fe0771ce9d6a4d77b26c9b37385c31b2d0cd9d | |
parent | a0f126b973b81b9e7088518469600a61bb3ab8ea (diff) | |
parent | 08d6bedcaaaeb29ddb416708aff75c54b40baa05 (diff) | |
download | wallabag-11f15430ffc67e30f084cffc8e909ace87ce19e1.tar.gz wallabag-11f15430ffc67e30f084cffc8e909ace87ce19e1.tar.zst wallabag-11f15430ffc67e30f084cffc8e909ace87ce19e1.zip |
Merge pull request #3615 from notFloran/3612-login-by-email
Allow login by email
-rw-r--r-- | app/config/security.yml | 2 | ||||
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/app/config/security.yml b/app/config/security.yml index 796dc361..02afc9ea 100644 --- a/app/config/security.yml +++ b/app/config/security.yml | |||
@@ -12,7 +12,7 @@ security: | |||
12 | class: WallabagUserBundle:User | 12 | class: WallabagUserBundle:User |
13 | property: username | 13 | property: username |
14 | fos_userbundle: | 14 | fos_userbundle: |
15 | id: fos_user.user_provider.username | 15 | id: fos_user.user_provider.username_email |
16 | 16 | ||
17 | # the main part of the security, where you can set up firewalls | 17 | # the main part of the security, where you can set up firewalls |
18 | # for specific sections of your app | 18 | # for specific sections of your app |
diff --git a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php index 2cf596d4..395208a2 100644 --- a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php | |||
@@ -6,6 +6,16 @@ use Tests\Wallabag\CoreBundle\WallabagCoreTestCase; | |||
6 | 6 | ||
7 | class SecurityControllerTest extends WallabagCoreTestCase | 7 | class SecurityControllerTest extends WallabagCoreTestCase |
8 | { | 8 | { |
9 | public function testLoginWithEmail() | ||
10 | { | ||
11 | $this->logInAsUsingHttp('bigboss@wallabag.org'); | ||
12 | $client = $this->getClient(); | ||
13 | $client->followRedirects(); | ||
14 | |||
15 | $crawler = $client->request('GET', '/config'); | ||
16 | $this->assertContains('config.form_rss.description', $crawler->filter('body')->extract(['_text'])[0]); | ||
17 | } | ||
18 | |||
9 | public function testLoginWithout2Factor() | 19 | public function testLoginWithout2Factor() |
10 | { | 20 | { |
11 | $this->logInAs('admin'); | 21 | $this->logInAs('admin'); |
@@ -81,7 +91,7 @@ class SecurityControllerTest extends WallabagCoreTestCase | |||
81 | } | 91 | } |
82 | 92 | ||
83 | $client->followRedirects(); | 93 | $client->followRedirects(); |
84 | $crawler = $client->request('GET', '/register'); | 94 | $client->request('GET', '/register'); |
85 | $this->assertContains('registration.submit', $client->getResponse()->getContent()); | 95 | $this->assertContains('registration.submit', $client->getResponse()->getContent()); |
86 | } | 96 | } |
87 | } | 97 | } |