mirror of https://github.com/poanetwork/quorum.git
permissions: code clean up based on review comments
This commit is contained in:
parent
38c1682ca4
commit
cbad8d7b5d
|
@ -137,7 +137,6 @@ var (
|
|||
utils.EVMInterpreterFlag,
|
||||
configFileFlag,
|
||||
utils.EnableNodePermissionFlag,
|
||||
utils.PermissionContractAddressFlag,
|
||||
utils.RaftModeFlag,
|
||||
utils.RaftBlockTimeFlag,
|
||||
utils.RaftJoinExistingFlag,
|
||||
|
|
|
@ -607,13 +607,6 @@ var (
|
|||
Usage: "If enabled, the node will allow only a defined list of nodes to connect",
|
||||
}
|
||||
|
||||
// Quorum permission contract
|
||||
PermissionContractAddressFlag = cli.StringFlag{
|
||||
Name: "permission.contract",
|
||||
Usage: "If passed, the node will use this contract to bootstrap permission instead of contract from genesis.json",
|
||||
Value: "0x",
|
||||
}
|
||||
|
||||
// Istanbul settings
|
||||
IstanbulRequestTimeoutFlag = cli.Uint64Flag{
|
||||
Name: "istanbul.requesttimeout",
|
||||
|
|
|
@ -293,11 +293,9 @@ func (s *QuorumControlsAPI) validateOrg(orgId, pOrgId string) (ExecStatus, error
|
|||
if types.OrgInfoMap.GetOrg(locOrgId) != nil {
|
||||
return ErrOrgExists, errors.New("org exists")
|
||||
}
|
||||
} else {
|
||||
if types.OrgInfoMap.GetOrg(orgId) != nil {
|
||||
} else if types.OrgInfoMap.GetOrg(orgId) != nil {
|
||||
return ErrOrgExists, errors.New("org exists")
|
||||
}
|
||||
}
|
||||
return ExecSuccess, nil
|
||||
}
|
||||
|
||||
|
@ -334,11 +332,9 @@ func (s *QuorumControlsAPI) valNodeStatusChange(orgId, url string, op int64) (Ex
|
|||
if len(url) == 0 {
|
||||
return ErrInvalidNode, errors.New("invalid node id")
|
||||
}
|
||||
if execStatus, err := s.valNodeDetails(url); err != nil {
|
||||
if execStatus != ErrNodePresent {
|
||||
if execStatus, err := s.valNodeDetails(url); err != nil && execStatus != ErrNodePresent {
|
||||
return execStatus, errors.New("node not found")
|
||||
}
|
||||
}
|
||||
|
||||
node := types.NodeInfoMap.GetNodeByUrl(url)
|
||||
if node != nil {
|
||||
|
|
|
@ -1333,8 +1333,6 @@ func checkAccount(fromAcct common.Address, toAcct *common.Address) error {
|
|||
case types.Transact:
|
||||
if toAcct == nil {
|
||||
return errors.New("account does not have contract create permissions")
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
@ -195,7 +195,7 @@ When an organization is in suspended status, no transactions or contract deploy
|
|||
|
||||
#### quorumPermission.addSubOrg
|
||||
This api can be executed by a organization admin account to create a sub organization under the master org.
|
||||
* Input: parent org id, sub organization id, enode id (not mandatory and can be null), account id (not mandatory and can be 0x0)
|
||||
* Input: parent org id, alphanumeric sub organization id, enode id (not mandatory and can be null), account id (not mandatory and can be 0x0)
|
||||
* Output: Status of the operation
|
||||
* Example:
|
||||
```
|
||||
|
|
|
@ -343,12 +343,6 @@ func (s *Ethereum) APIs() []rpc.API {
|
|||
Service: quorum.NewQuorumControlsAPI(s.txPool, s.accountManager),
|
||||
Public: true,
|
||||
},
|
||||
{
|
||||
Namespace: "quorumOrgMgmt",
|
||||
Version: "1.0",
|
||||
Service: quorum.NewQuorumControlsAPI(s.txPool, s.accountManager),
|
||||
Public: true,
|
||||
},
|
||||
}...)
|
||||
return apis
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue