From 2973ff62effd3bb65b48882bbd35d9137cb41d8f Mon Sep 17 00:00:00 2001 From: Kartik Shah Date: Fri, 23 Feb 2018 12:26:02 +0530 Subject: [PATCH] Added user1 role to fix registration error Without the role specified in the call to the register function, an error is returned, demanding an identity type be provided in the call. Adding a 'client' role in the arguments fixes this. --- fabcar/registerUser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fabcar/registerUser.js b/fabcar/registerUser.js index 2baf8d1c..849b8fb1 100644 --- a/fabcar/registerUser.js +++ b/fabcar/registerUser.js @@ -53,7 +53,7 @@ Fabric_Client.newDefaultKeyValueStore({ path: store_path // at this point we should have the admin user // first need to register the user with the CA server - return fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1'}, admin_user); + return fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1', role: 'client'}, admin_user); }).then((secret) => { // next we need to enroll the user with CA server console.log('Successfully registered user1 - secret:'+ secret);