diff --git a/config_app/js/services/user-service.js b/config_app/js/services/user-service.js index 3203e9185..8c222b955 100644 --- a/config_app/js/services/user-service.js +++ b/config_app/js/services/user-service.js @@ -20,7 +20,6 @@ function(ApiService, CookieService, $rootScope, Config, $location, $timeout) { }; var userService = {}; - var _EXTERNAL_SERVICES = ['ldap', 'jwtauthn', 'keystone', 'dex']; userService.hasEverLoggedIn = function() { return CookieService.get('quay.loggedin') == 'true'; @@ -167,21 +166,6 @@ function(ApiService, CookieService, $rootScope, Config, $location, $timeout) { return null; }; - userService.getCLIUsername = function() { - if (!userResponse) { - return null; - } - - var externalUsername = null; - userResponse.logins.forEach(function(login) { - if (_EXTERNAL_SERVICES.indexOf(login.service) >= 0) { - externalUsername = login.service_identifier; - } - }); - - return externalUsername || userResponse.username; - }; - userService.currentUser = function() { return userResponse; }; diff --git a/static/js/services/user-service.js b/static/js/services/user-service.js index af59217be..8111bb0c0 100644 --- a/static/js/services/user-service.js +++ b/static/js/services/user-service.js @@ -20,7 +20,7 @@ function(ApiService, CookieService, $rootScope, Config, $location, $timeout) { }; var userService = {}; - var _EXTERNAL_SERVICES = ['ldap', 'jwtauthn', 'keystone', 'dex']; + var _INTERNAL_AUTH_SERVICES = ['ldap', 'jwtauthn', 'keystone']; userService.hasEverLoggedIn = function() { return CookieService.get('quay.loggedin') == 'true'; @@ -174,7 +174,7 @@ function(ApiService, CookieService, $rootScope, Config, $location, $timeout) { var externalUsername = null; userResponse.logins.forEach(function(login) { - if (_EXTERNAL_SERVICES.indexOf(login.service) >= 0) { + if (_INTERNAL_AUTH_SERVICES.indexOf(login.service) >= 0) { externalUsername = login.service_identifier; } });