Merge pull request #3366 from quay/joseph.schorr/QUAY-1333/creds-dialog-fix

Remove dex from the CLI username whitelist
This commit is contained in:
Joseph Schorr 2019-02-18 12:16:01 -05:00 committed by GitHub
commit ca5ec6f10f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 18 deletions

View file

@ -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;
};

View file

@ -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;
}
});