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

This commit is contained in:
vsmk98 2019-04-17 21:35:26 +08:00
parent afc9e3a967
commit 650cd6eca5
1 changed files with 2 additions and 2 deletions

View File

@ -640,7 +640,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
// Check if the sender account is authorized to perform the transaction // Check if the sender account is authorized to perform the transaction
if isQuorum { if isQuorum {
if err := checkAccount(from, tx.To(), pool.EnodeId); err != nil { if err := checkAccount(from, tx.To()); err != nil {
return ErrUnAuthorizedAccount return ErrUnAuthorizedAccount
} }
} }
@ -1312,7 +1312,7 @@ func (t *txLookup) Remove(hash common.Hash) {
} }
// checks if the account is permissioned for transaction // checks if the account is permissioned for transaction
func checkAccount(fromAcct common.Address, toAcct *common.Address, enodeId string) error { func checkAccount(fromAcct common.Address, toAcct *common.Address) error {
access := types.GetAcctAccess(fromAcct) access := types.GetAcctAccess(fromAcct)
switch access { switch access {