From 285c1d426963e01472083ecc21dc9da65a5b63b9 Mon Sep 17 00:00:00 2001 From: Pierre Date: Tue, 29 Jun 2021 13:40:49 +0200 Subject: [PATCH] SONAR-15109 exclude project-specific webhooks from global webhook list --- .../java/org/sonar/db/webhook/WebhookDao.java | 4 ---- .../org/sonar/db/webhook/WebhookMapper.java | 2 -- .../org/sonar/db/webhook/WebhookMapper.xml | 6 ------ .../org/sonar/db/webhook/WebhookDaoTest.java | 20 ------------------- .../sonar/server/webhook/ws/ListAction.java | 2 +- .../server/webhook/ws/ListActionTest.java | 5 ++++- 6 files changed, 5 insertions(+), 34 deletions(-) diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDao.java index 8c892304793..4baa61f2ce9 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDao.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDao.java @@ -34,10 +34,6 @@ public class WebhookDao implements Dao { this.system2 = system2; } - public List selectAll(DbSession dbSession) { - return mapper(dbSession).selectAllOrderedByName(); - } - public List selectGlobalWebhooks(DbSession dbSession) { return mapper(dbSession).selectGlobalWebhooksOrderedByName(); } diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookMapper.java index d1d48898429..dbf24214302 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookMapper.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookMapper.java @@ -28,8 +28,6 @@ public interface WebhookMapper { @CheckForNull WebhookDto selectByUuid(@Param("webhookUuid") String webhookUuid); - List selectAllOrderedByName(); - List selectGlobalWebhooksOrderedByName(); List selectForProjectUuidOrderedByName(@Param("projectUuid") String projectUuid); diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/webhook/WebhookMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/webhook/WebhookMapper.xml index 7459d2b11e9..8978cdfb74f 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/webhook/WebhookMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/webhook/WebhookMapper.xml @@ -20,12 +20,6 @@ where uuid = #{webhookUuid,jdbcType=VARCHAR} - -