From 503995527b17f0c3d21a1ed5eacbee43a67706fc Mon Sep 17 00:00:00 2001 From: jiangbuyun Date: Tue, 14 Jun 2022 15:35:37 +0800 Subject: [PATCH] =?UTF-8?q?repchain2.0-update62:=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/921000005k36123789.node4/system.conf | 2 +- src/main/scala/rep/authority/check/PermissionVerify.scala | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/921000005k36123789.node4/system.conf b/conf/921000005k36123789.node4/system.conf index 4ab8fcbb..9d6d1b0b 100644 --- a/conf/921000005k36123789.node4/system.conf +++ b/conf/921000005k36123789.node4/system.conf @@ -69,7 +69,7 @@ system { #chain_cert_name_jks = "951002007l78123233.super_admin" genesis_node_name = "121000005l35120456.node1" - chain_cert_name = "#951002007l78123233.super_admin" + chain_cert_name = "identity-net:951002007l78123233.super_admin" chain_network_id = "identity-net" #组网id,组网id的命名不能包含"_"这样的字符 basic_chain_id = "identity-net" #api是否开启 diff --git a/src/main/scala/rep/authority/check/PermissionVerify.scala b/src/main/scala/rep/authority/check/PermissionVerify.scala index 0612eefc..0ce2aa87 100644 --- a/src/main/scala/rep/authority/check/PermissionVerify.scala +++ b/src/main/scala/rep/authority/check/PermissionVerify.scala @@ -174,11 +174,11 @@ class PermissionVerify(ctx: RepChainSystemContext) { }*/ try { if (!CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, opName = s"${ctx.getConfig.getChainNetworkId}${IdTool.DIDPrefixSeparator}*${IdTool.NameSpaceSeparator}deploy", dbInstance)) { - r = CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, ctx.getConfig.getChainNetworkId+IdTool.DIDPrefixSeparator+cid.chaincodeName + "${IdTool.NameSpaceSeparator}deploy", dbInstance) + r = CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, ctx.getConfig.getChainNetworkId+IdTool.DIDPrefixSeparator+cid.chaincodeName + s"${IdTool.NameSpaceSeparator}deploy", dbInstance) } } catch { case e: SandboxException => - r = CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, ctx.getConfig.getChainNetworkId+IdTool.DIDPrefixSeparator+cid.chaincodeName + "${IdTool.NameSpaceSeparator}deploy", dbInstance) + r = CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, ctx.getConfig.getChainNetworkId+IdTool.DIDPrefixSeparator+cid.chaincodeName + s"${IdTool.NameSpaceSeparator}deploy", dbInstance) } r @@ -190,11 +190,11 @@ class PermissionVerify(ctx: RepChainSystemContext) { val dbInstance = ctx.getBlockPreload(doTrans.da) try { if (!CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, opName = s"${ctx.getConfig.getChainNetworkId}${IdTool.DIDPrefixSeparator}*${IdTool.NameSpaceSeparator}setState", dbInstance)) { - r = CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, ctx.getConfig.getChainNetworkId+IdTool.DIDPrefixSeparator+cid.chaincodeName + "${IdTool.NameSpaceSeparator}setState", dbInstance) + r = CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, ctx.getConfig.getChainNetworkId+IdTool.DIDPrefixSeparator+cid.chaincodeName + s"${IdTool.NameSpaceSeparator}setState", dbInstance) } } catch { case e: SandboxException => - r = CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, ctx.getConfig.getChainNetworkId+IdTool.DIDPrefixSeparator+cid.chaincodeName + "${IdTool.NameSpaceSeparator}setState", dbInstance) + r = CheckPermissionOfCertId(doTrans.t.signature.get.certId.get, ctx.getConfig.getChainNetworkId+IdTool.DIDPrefixSeparator+cid.chaincodeName + s"${IdTool.NameSpaceSeparator}setState", dbInstance) } r }