permission: Added qip714Block check to GetAccountAccess. Corrected comments

This commit is contained in:
vsmk98 2019-09-27 11:40:59 +08:00
parent 4280bdadac
commit 532ba24f48
2 changed files with 8 additions and 3 deletions

View File

@ -359,7 +359,13 @@ func (r *RoleCache) GetRoleList() []RoleInfo {
// Returns the access type for an account. If not found returns
// default access
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)
if a != nil && a.Status == AcctActive {
// get the org details and ultimate org details. check org status

View File

@ -277,8 +277,7 @@ func (p *PermissionCtrl) Stop() error {
return nil
}
// monitors org management related events happening via smart contracts
// and updates cache accordingly
// monitors QIP714Block and set default access
func (p *PermissionCtrl) monitorQIP714Block() error {
// if QIP714block is not given, set the default access
// to readonly