code: func HasPermission(accountGetter acmstate.AccountGetter, acc *acm.Account, perm permission.PermFlag, logger *logging.Logger) bool {
  	if perm > permission.AllPermFlags {
  		logger.InfoMsg(
  			fmt.Sprintf("HasPermission called on invalid permission 0b%b (invalid) > 0b%b (maximum) ",
  				perm, permission.AllPermFlags),
  			"invalid_permission", perm,
  			"maximum_permission", permission.AllPermFlags)
  		return false
  	}
  
  	v, err := acc.Permissions.Base.Compose(acmstate.GlobalAccountPermissions(accountGetter).Base).Get(perm)
  	if err != nil {
  		logger.TraceMsg("Error obtaining permission value (will default to false/deny)",
  			"perm_flag", perm.String(),
  			structure.ErrorKey, err)
  	}
  
  	if v {
  		logger.TraceMsg("Account has permission",
  			"account_address", acc.GetAddress,
  			"perm_flag", perm.String())
  	} else {
  		logger.TraceMsg("Account does not have permission",
  			"account_address", acc.GetAddress,
  			"perm_flag", perm.String())
  	}
  	return v
  }
docs: //---------------------------------------------------------------
  // Get permission on an account or fall back to global value