Fixed some permission issues with demos. (#2099)

This commit is contained in:
Michele Sollecito 2017-11-21 11:20:17 +00:00 committed by GitHub
parent ad9f335dde
commit 37b4d0e939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 6 deletions

View File

@ -35,7 +35,10 @@ dependencies {
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["StartFlow.net.corda.attachmentdemo.AttachmentDemoFlow"]]]
ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["StartFlow.net.corda.attachmentdemo.AttachmentDemoFlow",
"InvokeRpc.attachmentExists",
"InvokeRpc.uploadAttachment",
"InvokeRpc.internalVerifiedTransactionsFeed"]]]
directory "./build/nodes"
node {

View File

@ -71,7 +71,10 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
"StartFlow.net.corda.finance.flows.CashConfigDataFlow",
"StartFlow.net.corda.finance.flows.CashExitFlow",
"StartFlow.net.corda.finance.flows.CashIssueAndPaymentFlow",
"StartFlow.net.corda.finance.flows.CashConfigDataFlow"]]
"StartFlow.net.corda.finance.flows.CashConfigDataFlow",
"InvokeRpc.waitUntilNetworkReady",
"InvokeRpc.wellKnownPartyFromX500Name",
"InvokeRpc.notaryIdentities"]]
]
}
node {
@ -84,7 +87,10 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
['username' : "bigCorpUser",
'password' : "test",
'permissions': ["StartFlow.net.corda.finance.flows.CashPaymentFlow",
"StartFlow.net.corda.finance.flows.CashConfigDataFlow"]]
"StartFlow.net.corda.finance.flows.CashConfigDataFlow",
"InvokeRpc.waitUntilNetworkReady",
"InvokeRpc.wellKnownPartyFromX500Name",
"InvokeRpc.notaryIdentities"]]
]
}
}

View File

@ -9,6 +9,7 @@ import net.corda.finance.flows.CashConfigDataFlow
import net.corda.finance.flows.CashExitFlow
import net.corda.finance.flows.CashIssueAndPaymentFlow
import net.corda.finance.flows.CashPaymentFlow
import net.corda.node.services.Permissions.Companion.all
import net.corda.node.services.Permissions.Companion.startFlow
import net.corda.nodeapi.User
import net.corda.testing.BOC
@ -65,7 +66,8 @@ private class BankOfCordaDriver {
startFlow<CashConfigDataFlow>(),
startFlow<CashExitFlow>(),
startFlow<CashIssueAndPaymentFlow>(),
startFlow<CashConfigDataFlow>()
startFlow<CashConfigDataFlow>(),
all()
))
val bankOfCorda = startNode(
providedName = BOC.name,
@ -73,7 +75,8 @@ private class BankOfCordaDriver {
val bigCorpUser = User(BIGCORP_USERNAME, "test",
permissions = setOf(
startFlow<CashPaymentFlow>(),
startFlow<CashConfigDataFlow>()))
startFlow<CashConfigDataFlow>(),
all()))
startNode(providedName = BIGCORP_LEGAL_NAME, rpcUsers = listOf(bigCorpUser))
startWebserver(bankOfCorda.get())
}

View File

@ -51,7 +51,9 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
'permissions' : [
"StartFlow.net.corda.irs.flows.AutoOfferFlow\$Requester",
"StartFlow.net.corda.irs.flows.UpdateBusinessDayFlow\$Broadcast",
"StartFlow.net.corda.irs.api.NodeInterestRates\$UploadFixesFlow"
"StartFlow.net.corda.irs.api.NodeInterestRates\$UploadFixesFlow",
"InvokeRpc.vaultQueryBy",
"InvokeRpc.networkMapSnapshot"
]]
]