mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
Set adequate permissions for the nodes such that NodeExplorer can connect
This commit is contained in:
parent
eac43e3967
commit
ae88242cc1
@ -2,7 +2,7 @@
|
||||
<configuration default="false" name="BankOfCordaDriverKt - Run Stack" type="JetRunConfigurationType" factoryName="Kotlin">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" value="net.corda.bank.BankOfCordaDriverKt" />
|
||||
<option name="VM_PARAMETERS" value="-Dnet.corda.node.cordapp.scan.packages=net.corda.finance.contracts.asset" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="--role ISSUER --quantity 100 --currency USD" />
|
||||
<option name="WORKING_DIRECTORY" value="" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
|
@ -5,6 +5,7 @@ import net.corda.bank.api.BankOfCordaClientApi
|
||||
import net.corda.bank.api.BankOfCordaWebApi.IssueRequestParams
|
||||
import net.corda.core.identity.CordaX500Name
|
||||
import net.corda.core.utilities.NetworkHostAndPort
|
||||
import net.corda.finance.flows.CashConfigDataFlow
|
||||
import net.corda.finance.flows.CashExitFlow
|
||||
import net.corda.finance.flows.CashIssueAndPaymentFlow
|
||||
import net.corda.finance.flows.CashPaymentFlow
|
||||
@ -61,20 +62,25 @@ private class BankOfCordaDriver {
|
||||
when (role) {
|
||||
Role.ISSUER -> {
|
||||
driver(dsl = {
|
||||
startNode(providedName = DUMMY_NOTARY.name,
|
||||
advertisedServices = setOf(ServiceInfo(SimpleNotaryService.type)))
|
||||
val bankUser = User(
|
||||
BANK_USERNAME,
|
||||
"test",
|
||||
permissions = setOf(
|
||||
startFlowPermission<CashPaymentFlow>(),
|
||||
startFlowPermission<CashConfigDataFlow>(),
|
||||
startFlowPermission<CashExitFlow>(),
|
||||
startFlowPermission<CashIssueAndPaymentFlow>(),
|
||||
startFlowPermission<CashExitFlow>()))
|
||||
val bigCorpUser = User(BIGCORP_USERNAME, "test",
|
||||
permissions = setOf(
|
||||
startFlowPermission<CashPaymentFlow>()))
|
||||
startNode(providedName = DUMMY_NOTARY.name,
|
||||
advertisedServices = setOf(ServiceInfo(SimpleNotaryService.type)))
|
||||
startFlowPermission<CashConfigDataFlow>()
|
||||
))
|
||||
val bankOfCorda = startNode(
|
||||
providedName = BOC.name,
|
||||
rpcUsers = listOf(bankUser))
|
||||
val bigCorpUser = User(BIGCORP_USERNAME, "test",
|
||||
permissions = setOf(
|
||||
startFlowPermission<CashPaymentFlow>(),
|
||||
startFlowPermission<CashConfigDataFlow>()))
|
||||
startNode(providedName = BIGCORP_LEGAL_NAME, rpcUsers = listOf(bigCorpUser))
|
||||
startWebserver(bankOfCorda.get())
|
||||
waitForAllNodesToFinish()
|
||||
|
Loading…
Reference in New Issue
Block a user