webhooks: fix filter for internal auth
1 files changed, 6 insertions(+), 1 deletions(-) M webhooks/config.go
M webhooks/config.go => webhooks/config.go +6 -1
@@ 72,7 72,12 @@ func FilterWebhooks(ctx context.Context) (sq.Sqlizer, error) { if err != nil { return nil, err } if ac.ClientID != nil { if ac.AuthMethod == auth.AUTH_INTERNAL { return sq.And{ sq.Expr(`user_id = ?`, user.UserID), sq.Expr(`auth_method = 'INTERNAL'`), }, nil } else if ac.ClientID != nil { // XXX: Should we maybe return all webhooks configured by client ID? return sq.And{ sq.Expr(`NOW() at time zone 'utc' < expires`),