diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-07-11 13:00:22 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-07-14 08:19:09 +0530 |
commit | 4b33c4c6d1aa529ec22606995123cfa3a151ccee (patch) | |
tree | 3b8a555e88995454e9db663bd35cd5c3eb5ab6f8 /app/views/profiles | |
parent | df49492fc011bd74ebaa4cb82bd85252127859a0 (diff) | |
download | gitlab-ce-4b33c4c6d1aa529ec22606995123cfa3a151ccee.tar.gz |
Load Javascript U2F library selectively.
1. Only on supported Chrome versions
2. Mainly, this lets us simplify the javascript-based U2F check to
`window.u2f`, where `window.u2f` can either be loaded from the GitLab
server (for Chrome) or from the Firefox extension.
3. This is a better way to provide browser detection for U2F.
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/two_factor_auths/show.html.haml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml index 5890456bee2..0e9a80a6267 100644 --- a/app/views/profiles/two_factor_auths/show.html.haml +++ b/app/views/profiles/two_factor_auths/show.html.haml @@ -2,6 +2,10 @@ - header_title "Two-Factor Authentication", profile_two_factor_auth_path = render 'profiles/head' +- content_for :page_specific_javascripts do + - if inject_u2f_api? + = page_specific_javascript_tag('u2f.js') + .row.prepend-top-default .col-lg-3 %h4.prepend-top-0 |