From c8c942956e9d94750829045f6e21bc0a9cd4ac05 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 24 Jul 2025 17:52:55 +0200 Subject: [PATCH] Fix: Missing role error on chaincode authorization Signed-off-by: Jakub Dzikowski --- chaincode/src/contracts/authorize.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chaincode/src/contracts/authorize.ts b/chaincode/src/contracts/authorize.ts index 59fc6a9a6a..f0fe1a7b7d 100644 --- a/chaincode/src/contracts/authorize.ts +++ b/chaincode/src/contracts/authorize.ts @@ -84,13 +84,13 @@ export function ensureChaincodeIsAllowed(chaincode: string, allowedChaincodes: s export interface AuthorizeOptions { allowedOrgs?: string[]; allowedRoles?: string[]; - allowedChaincodes?: string[]; + allowedOriginChaincodes?: string[]; } export async function authorize(ctx: GalaChainContext, options: AuthorizeOptions) { - if (options.allowedChaincodes && ctx.callingUser.startsWith("service|")) { + if (options.allowedOriginChaincodes && ctx.callingUser.startsWith("service|")) { const callingChaincode = ctx.callingUser.slice(8); - ensureChaincodeIsAllowed(callingChaincode, options.allowedChaincodes); + ensureChaincodeIsAllowed(callingChaincode, options.allowedOriginChaincodes); return; }