mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
Addressed PR issues
This commit is contained in:
parent
e2f93f64a9
commit
5064cbb5c0
@ -164,16 +164,18 @@ private fun DoormanParameters.startDoorman() {
|
||||
// Create DB connection.
|
||||
val (datasource, database) = configureDatabase(dataSourceProperties)
|
||||
|
||||
val requestStorage = DBCertificateRequestStorage(database)
|
||||
|
||||
val storage = if (jiraConfig == null) {
|
||||
logger.warn("Doorman server is in 'Approve All' mode, this will approve all incoming certificate signing request.")
|
||||
// Approve all pending request.
|
||||
object : CertificationRequestStorage by DBCertificateRequestStorage(database) {
|
||||
object : CertificationRequestStorage by requestStorage {
|
||||
// The doorman is in approve all mode, returns all pending request id as approved request id.
|
||||
override fun getApprovedRequestIds() = getPendingRequestIds()
|
||||
}
|
||||
} else {
|
||||
val jiraClient = AsynchronousJiraRestClientFactory().createWithBasicHttpAuthentication(URI(jiraConfig.address), jiraConfig.username, jiraConfig.password)
|
||||
JiraCertificateRequestStorage(DBCertificateRequestStorage(database), jiraClient, jiraConfig.projectCode, jiraConfig.doneTransitionCode)
|
||||
JiraCertificateRequestStorage(requestStorage, jiraClient, jiraConfig.projectCode, jiraConfig.doneTransitionCode)
|
||||
}
|
||||
|
||||
// Daemon thread approving request periodically.
|
||||
|
Loading…
Reference in New Issue
Block a user