permissions: validation to check account status for accounts linked to admin roles

This commit is contained in:
vsmk98 2019-05-06 18:37:35 +08:00
parent 2716937f2e
commit 37f3581192
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ func (o *RoleCache) GetRoleList() []RoleInfo {
// default access
func GetAcctAccess(acctId common.Address) AccessType {
if a := AcctInfoMap.GetAccount(acctId); a != nil && a.Status == AcctActive {
if a.RoleId == networkAdminRole || a.RoleId == orgAdminRole {
if (a.RoleId == networkAdminRole || a.RoleId == orgAdminRole) && a.Status == AcctActive {
return FullAccess
}
if o := OrgInfoMap.GetOrg(a.OrgId); o != nil && o.Status == OrgApproved {