permissions: changed isOrgAdmin check to validate for network admin as well

This commit is contained in:
vsmk98 2019-04-16 14:14:08 +08:00
parent 505d8e1806
commit 47dd9d51c2
1 changed files with 2 additions and 2 deletions

View File

@ -262,8 +262,8 @@ func (s *QuorumControlsAPI) isOrgAdmin(account common.Address, orgId string) boo
ac := types.AcctInfoMap.GetAccount(account)
if ac != nil {
// check if the account is network admin
org := types.OrgInfoMap.GetOrg(ac.OrgId)
return ac.IsOrgAdmin && (ac.OrgId == orgId || org.UltimateParent == orgId)
org := types.OrgInfoMap.GetOrg(orgId)
return ac.IsOrgAdmin && (ac.OrgId == orgId || ac.OrgId == org.UltimateParent)
} else {
return false
}