Remove password confirmation in config app
Small fix to manually clean up temp dir when creating new temp dir, small fix to font awesome icons, change the jwt/keystone validators to not use username/password
This commit is contained in:
parent
496d94138c
commit
f5a8116f5a
9 changed files with 61 additions and 96 deletions
|
@ -51,15 +51,15 @@ angular.module("quay-config")
|
|||
|
||||
{'id': 'ldap', 'title': 'LDAP Authentication', 'condition': function(config) {
|
||||
return config.AUTHENTICATION_TYPE == 'LDAP';
|
||||
}, 'password': true},
|
||||
}},
|
||||
|
||||
{'id': 'jwt', 'title': 'JWT Authentication', 'condition': function(config) {
|
||||
return config.AUTHENTICATION_TYPE == 'JWT';
|
||||
}, 'password': true},
|
||||
}},
|
||||
|
||||
{'id': 'keystone', 'title': 'Keystone Authentication', 'condition': function(config) {
|
||||
return config.AUTHENTICATION_TYPE == 'Keystone';
|
||||
}, 'password': true},
|
||||
}},
|
||||
|
||||
{'id': 'apptoken-auth', 'title': 'App Token Authentication', 'condition': function(config) {
|
||||
return config.AUTHENTICATION_TYPE == 'AppToken';
|
||||
|
@ -345,50 +345,7 @@ angular.module("quay-config")
|
|||
$scope.validateAndSave = function() {
|
||||
$scope.validating = $scope.getServices($scope.config);
|
||||
|
||||
var requirePassword = false;
|
||||
for (var i = 0; i < $scope.validating.length; ++i) {
|
||||
var serviceInfo = $scope.validating[i];
|
||||
if (serviceInfo.service.password) {
|
||||
requirePassword = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!requirePassword) {
|
||||
$scope.performValidateAndSave();
|
||||
return;
|
||||
}
|
||||
|
||||
var box = bootbox.dialog({
|
||||
"message": 'Please enter your superuser password to validate your auth configuration:' +
|
||||
'<form style="margin-top: 10px" action="javascript:$(\'.btn-continue\').click()">' +
|
||||
'<input id="validatePassword" class="form-control" type="password" placeholder="Password">' +
|
||||
'</form>',
|
||||
"title": 'Enter Password',
|
||||
"buttons": {
|
||||
"success": {
|
||||
"label": "Validate Config",
|
||||
"className": "btn-success btn-continue",
|
||||
"callback": function() {
|
||||
$scope.performValidateAndSave($('#validatePassword').val());
|
||||
}
|
||||
},
|
||||
"close": {
|
||||
"label": "Cancel",
|
||||
"className": "btn-default",
|
||||
"callback": function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
box.bind('shown.bs.modal', function(){
|
||||
box.find("input").focus();
|
||||
box.find("form").submit(function() {
|
||||
if (!$('#validatePassword').val()) { return; }
|
||||
box.modal('hide');
|
||||
});
|
||||
});
|
||||
$scope.performValidateAndSave();
|
||||
};
|
||||
|
||||
$scope.performValidateAndSave = function(opt_password) {
|
||||
|
|
Reference in a new issue