diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2018-12-02 12:43:05 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-01-23 13:28:02 +0100 |
commit | a6b242a1fd6f8900d80354361449f1bf62506ef9 (patch) | |
tree | f69d87208d0ebbdb8517529582280b174af74a16 /app/Resources | |
parent | acd4412080dfb73ecaa7f9983728d1d55bc27ea4 (diff) | |
download | wallabag-a6b242a1fd6f8900d80354361449f1bf62506ef9.tar.gz wallabag-a6b242a1fd6f8900d80354361449f1bf62506ef9.tar.zst wallabag-a6b242a1fd6f8900d80354361449f1bf62506ef9.zip |
Enable OTP 2FA
- Update SchebTwoFactorBundle to version 3
- Enable Google 2fa on the bundle
- Disallow ability to use both email and google as 2fa
- Update Ocramius Proxy Manager to handle typed function & attributes (from PHP 7)
- use `$this->addFlash` shortcut instead of `$this->get('session')->getFlashBag()->add`
- update admin to be able to create/reset the 2fa
Diffstat (limited to 'app/Resources')
-rw-r--r-- | app/Resources/static/themes/_global/index.js | 18 | ||||
-rwxr-xr-x | app/Resources/static/themes/material/index.js | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index bb3e95b6..9ad96fc0 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js | |||
@@ -89,4 +89,22 @@ $(document).ready(() => { | |||
89 | } | 89 | } |
90 | }; | 90 | }; |
91 | }); | 91 | }); |
92 | |||
93 | // mimic radio button because emailTwoFactor is a boolean | ||
94 | $('#update_user_googleTwoFactor').on('change', () => { | ||
95 | $('#update_user_emailTwoFactor').prop('checked', false); | ||
96 | }); | ||
97 | |||
98 | $('#update_user_emailTwoFactor').on('change', () => { | ||
99 | $('#update_user_googleTwoFactor').prop('checked', false); | ||
100 | }); | ||
101 | |||
102 | // same mimic for super admin | ||
103 | $('#user_googleTwoFactor').on('change', () => { | ||
104 | $('#user_emailTwoFactor').prop('checked', false); | ||
105 | }); | ||
106 | |||
107 | $('#user_emailTwoFactor').on('change', () => { | ||
108 | $('#user_googleTwoFactor').prop('checked', false); | ||
109 | }); | ||
92 | }); | 110 | }); |
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 05794597..2926cad1 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js | |||
@@ -50,25 +50,30 @@ $(document).ready(() => { | |||
50 | $('#tag_label').focus(); | 50 | $('#tag_label').focus(); |
51 | return false; | 51 | return false; |
52 | }); | 52 | }); |
53 | |||
53 | $('#nav-btn-add').on('click', () => { | 54 | $('#nav-btn-add').on('click', () => { |
54 | toggleNav('.nav-panel-add', '#entry_url'); | 55 | toggleNav('.nav-panel-add', '#entry_url'); |
55 | return false; | 56 | return false; |
56 | }); | 57 | }); |
58 | |||
57 | const materialAddForm = $('.nav-panel-add'); | 59 | const materialAddForm = $('.nav-panel-add'); |
58 | materialAddForm.on('submit', () => { | 60 | materialAddForm.on('submit', () => { |
59 | materialAddForm.addClass('disabled'); | 61 | materialAddForm.addClass('disabled'); |
60 | $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur'); | 62 | $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur'); |
61 | }); | 63 | }); |
64 | |||
62 | $('#nav-btn-search').on('click', () => { | 65 | $('#nav-btn-search').on('click', () => { |
63 | toggleNav('.nav-panel-search', '#search_entry_term'); | 66 | toggleNav('.nav-panel-search', '#search_entry_term'); |
64 | return false; | 67 | return false; |
65 | }); | 68 | }); |
69 | |||
66 | $('.close').on('click', (e) => { | 70 | $('.close').on('click', (e) => { |
67 | $(e.target).parent('.nav-panel-item').hide(100); | 71 | $(e.target).parent('.nav-panel-item').hide(100); |
68 | $('.nav-panel-actions').show(100); | 72 | $('.nav-panel-actions').show(100); |
69 | $('.nav-panels').css('background', 'transparent'); | 73 | $('.nav-panels').css('background', 'transparent'); |
70 | return false; | 74 | return false; |
71 | }); | 75 | }); |
76 | |||
72 | $(window).scroll(() => { | 77 | $(window).scroll(() => { |
73 | const s = $(window).scrollTop(); | 78 | const s = $(window).scrollTop(); |
74 | const d = $(document).height(); | 79 | const d = $(document).height(); |