mirror of https://github.com/poanetwork/quorum.git
permission: Added qip714Block check to GetAccountAccess. Corrected comments
This commit is contained in:
parent
4280bdadac
commit
532ba24f48
|
@ -359,7 +359,13 @@ func (r *RoleCache) GetRoleList() []RoleInfo {
|
||||||
// Returns the access type for an account. If not found returns
|
// Returns the access type for an account. If not found returns
|
||||||
// default access
|
// default access
|
||||||
func GetAcctAccess(acctId common.Address) AccessType {
|
func GetAcctAccess(acctId common.Address) AccessType {
|
||||||
// check if the org status is fine to do the transction
|
//if we have not reached QIP714 block return default access
|
||||||
|
//which will be full access
|
||||||
|
if !QIP714BlockReached {
|
||||||
|
return DefaultAccess
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if the org status is fine to do the transaction
|
||||||
a := AcctInfoMap.GetAccount(acctId)
|
a := AcctInfoMap.GetAccount(acctId)
|
||||||
if a != nil && a.Status == AcctActive {
|
if a != nil && a.Status == AcctActive {
|
||||||
// get the org details and ultimate org details. check org status
|
// get the org details and ultimate org details. check org status
|
||||||
|
|
|
@ -277,8 +277,7 @@ func (p *PermissionCtrl) Stop() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// monitors org management related events happening via smart contracts
|
// monitors QIP714Block and set default access
|
||||||
// and updates cache accordingly
|
|
||||||
func (p *PermissionCtrl) monitorQIP714Block() error {
|
func (p *PermissionCtrl) monitorQIP714Block() error {
|
||||||
// if QIP714block is not given, set the default access
|
// if QIP714block is not given, set the default access
|
||||||
// to readonly
|
// to readonly
|
||||||
|
|
Loading…
Reference in New Issue