Better custom cert handling in the superuser tool
We now only allow certificates ending in .crt to be uploaded and we automatically install the certificate once it has been validated
This commit is contained in:
		
							parent
							
								
									da8032fe61
								
							
						
					
					
						commit
						e509eb4cba
					
				
					 6 changed files with 58 additions and 18 deletions
				
			
		|  | @ -1322,10 +1322,12 @@ angular.module("core-config-setup", ['angularFileUpload']) | |||
|       }, | ||||
|       controller: function($scope, $element, $upload, ApiService, UserService) { | ||||
|         $scope.resetUpload = 0; | ||||
|         $scope.certsUploading = false; | ||||
| 
 | ||||
|         var loadCertificates = function() { | ||||
|           $scope.certificatesResource = ApiService.getCustomCertificatesAsResource().get(function(resp) { | ||||
|             $scope.certInfo = resp; | ||||
|             $scope.certsUploading = false; | ||||
|           }); | ||||
|         }; | ||||
| 
 | ||||
|  | @ -1336,6 +1338,7 @@ angular.module("core-config-setup", ['angularFileUpload']) | |||
|         }); | ||||
| 
 | ||||
|         $scope.handleCertsSelected = function(files, callback) { | ||||
|           $scope.certsUploading = true; | ||||
|           $upload.upload({ | ||||
|             url: '/api/v1/superuser/customcerts/' + files[0].name, | ||||
|             method: 'POST', | ||||
|  |  | |||
		Reference in a new issue