From 05caf3dd333273772b879cb0ec8fa0431435637e Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Mon, 29 Jul 2024 13:55:57 -0400 Subject: [PATCH] respect 'deleted' flag in store.IsAccountGrantedSkipInterstitial --- CHANGELOG.md | 2 ++ controller/store/skipInterstitialGrant.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 646854c1..7c7cd4f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## v0.4.37 +FIX: Fix for `store.IsAccountGrantedSkipInterstitial` to respect the `deleted` flag. + FIX: When an error occurs connecting to the proxied endpoint, the `proxy` backend should return HTTP status `502` (https://github.com/openziti/zrok/issues/703) ## v0.4.36 diff --git a/controller/store/skipInterstitialGrant.go b/controller/store/skipInterstitialGrant.go index 2ec2d80a..db60a831 100644 --- a/controller/store/skipInterstitialGrant.go +++ b/controller/store/skipInterstitialGrant.go @@ -6,7 +6,7 @@ import ( ) func (str *Store) IsAccountGrantedSkipInterstitial(acctId int, trx *sqlx.Tx) (bool, error) { - stmt, err := trx.Prepare("select count(0) from skip_interstitial_grants where account_id = $1") + stmt, err := trx.Prepare("select count(0) from skip_interstitial_grants where account_id = $1 and not deleted") if err != nil { return false, errors.Wrap(err, "error preparing skip_interstitial_grants select statement") }