mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-17 15:04:34 +00:00
Add frontend support for the new clientca type
The frontend is modified to filter certificates from selector lists so only non-clientca certificate types can be set as server certificates.
This commit is contained in:
@ -632,6 +632,37 @@ module.exports = {
|
|||||||
return getAllObjects('nginx/certificates', expand, query);
|
return getAllObjects('nginx/certificates', expand, query);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve all certificates which have a type suitable for use as
|
||||||
|
* server certificates. This filters by provider for returned rows.
|
||||||
|
*
|
||||||
|
* @param {Array} [expand]
|
||||||
|
* @param {String} [query]
|
||||||
|
* @returns {Promise}
|
||||||
|
*/
|
||||||
|
getAllServerCertificates: function (expand, query) {
|
||||||
|
return getAllObjects('nginx/certificates', expand, query)
|
||||||
|
.then(rows => {
|
||||||
|
return rows.filter( row => row.provider !== 'clientca' );
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve all certificates which have a type suitable for use as
|
||||||
|
* client authentication certificates. This filters by provider for
|
||||||
|
* returned rows.
|
||||||
|
*
|
||||||
|
* @param {Array} [expand]
|
||||||
|
* @param {String} [query]
|
||||||
|
* @returns {Promise}
|
||||||
|
*/
|
||||||
|
getAllClientCertificates: function (expand, query) {
|
||||||
|
return getAllObjects('nginx/certificates', expand, query)
|
||||||
|
.then(rows => {
|
||||||
|
return rows.filter( row => row.provider === 'clientca' );
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
*/
|
*/
|
||||||
|
@ -263,7 +263,7 @@ module.exports = Mn.View.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
load: function (query, callback) {
|
load: function (query, callback) {
|
||||||
App.Api.Nginx.Certificates.getAll()
|
App.Api.Nginx.Certificates.getAllServerCertificates()
|
||||||
.then(rows => {
|
.then(rows => {
|
||||||
callback(rows);
|
callback(rows);
|
||||||
})
|
})
|
||||||
|
@ -331,7 +331,7 @@ module.exports = Mn.View.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
load: function (query, callback) {
|
load: function (query, callback) {
|
||||||
App.Api.Nginx.Certificates.getAll()
|
App.Api.Nginx.Certificates.getAllServerCertificates()
|
||||||
.then(rows => {
|
.then(rows => {
|
||||||
callback(rows);
|
callback(rows);
|
||||||
})
|
})
|
||||||
|
@ -265,7 +265,7 @@ module.exports = Mn.View.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
load: function (query, callback) {
|
load: function (query, callback) {
|
||||||
App.Api.Nginx.Certificates.getAll()
|
App.Api.Nginx.Certificates.getAllServerCertificates()
|
||||||
.then(rows => {
|
.then(rows => {
|
||||||
callback(rows);
|
callback(rows);
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user