diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-10-10 01:21:56 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-10-10 01:21:56 +0300 |
commit | 41b430b2cfa6d16e644d14164234f890ea17c744 (patch) | |
tree | 92db97015cfc589c94497e60bb960c78b1fa8d85 /app/assets/javascripts/dispatcher.js | |
parent | d6170ce4d8a0cbfd8552531c29163e44549222cf (diff) |
Remove u2f from globalnamespace
Diffstat (limited to 'app/assets/javascripts/dispatcher.js')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 1edd460f380..ad4bdeba01e 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -78,6 +78,7 @@ import initChangesDropdown from './init_changes_dropdown'; import AbuseReports from './abuse_reports'; import { ajaxGet, convertPermissionToBoolean } from './lib/utils/common_utils'; import AjaxLoadingSpinner from './ajax_loading_spinner'; +import U2FAuthenticate from './u2f/authenticate'; (function() { var Dispatcher; @@ -535,14 +536,16 @@ import AjaxLoadingSpinner from './ajax_loading_spinner'; case 'sessions': case 'omniauth_callbacks': if (!gon.u2f) break; - gl.u2fAuthenticate = new gl.U2FAuthenticate( + const u2fAuthenticate = new U2FAuthenticate( $('#js-authenticate-u2f'), '#js-login-u2f-form', gon.u2f, document.querySelector('#js-login-2fa-device'), document.querySelector('.js-2fa-form'), ); - gl.u2fAuthenticate.start(); + u2fAuthenticate.start(); + // needed in rspec + gl.u2fAuthenticate = u2fAuthenticate; case 'admin': new Admin(); switch (path[1]) { |