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:
commit
ca5ec6f10f
2 changed files with 2 additions and 18 deletions
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
Reference in a new issue