From 115842dbea776440f32234a6fa935703809f9624 Mon Sep 17 00:00:00 2001 From: vsmk98 Date: Wed, 10 Apr 2019 21:38:44 +0800 Subject: [PATCH] permissions: updated the getOrgDetails to return suborg list as well --- core/quorum/api.go | 2 +- core/types/permissions_cache.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/quorum/api.go b/core/quorum/api.go index 8565bda16..0eea0f792 100644 --- a/core/quorum/api.go +++ b/core/quorum/api.go @@ -192,7 +192,7 @@ func (s *QuorumControlsAPI) GetOrgDetails(orgId string) types.OrgDetailInfo { nodeList = append(nodeList, a) } } - return types.OrgDetailInfo{NodeList: nodeList, RoleList: roleList, AcctList: acctList} + return types.OrgDetailInfo{NodeList: nodeList, RoleList: roleList, AcctList: acctList, SubOrgList: types.OrgInfoMap.GetOrg(orgId).SubOrgList} } func (s *QuorumControlsAPI) AddOrg(orgId string, url string, acct common.Address, txa ethapi.SendTxArgs) ExecStatus { diff --git a/core/types/permissions_cache.go b/core/types/permissions_cache.go index a694b99a4..adb541488 100644 --- a/core/types/permissions_cache.go +++ b/core/types/permissions_cache.go @@ -77,9 +77,10 @@ type AccountInfo struct { } type OrgDetailInfo struct { - NodeList []NodeInfo - RoleList []RoleInfo - AcctList []AccountInfo + NodeList []NodeInfo + RoleList []RoleInfo + AcctList []AccountInfo + SubOrgList []string } type OrgStruct struct {