mirror of https://github.com/poanetwork/quorum.git
permissions: changed isOrgAdmin check to validate for network admin as well
This commit is contained in:
parent
505d8e1806
commit
47dd9d51c2
|
@ -262,8 +262,8 @@ func (s *QuorumControlsAPI) isOrgAdmin(account common.Address, orgId string) boo
|
||||||
ac := types.AcctInfoMap.GetAccount(account)
|
ac := types.AcctInfoMap.GetAccount(account)
|
||||||
if ac != nil {
|
if ac != nil {
|
||||||
// check if the account is network admin
|
// check if the account is network admin
|
||||||
org := types.OrgInfoMap.GetOrg(ac.OrgId)
|
org := types.OrgInfoMap.GetOrg(orgId)
|
||||||
return ac.IsOrgAdmin && (ac.OrgId == orgId || org.UltimateParent == orgId)
|
return ac.IsOrgAdmin && (ac.OrgId == orgId || ac.OrgId == org.UltimateParent)
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue