~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH hg.sr.ht] api/webhooks: Add missing default case

Details
Message ID
<028049d85eb74404324c.1656707270@asgard>
DKIM signature
pass
Download raw message
Patch: +2 -0
# HG changeset patch
# User Thorben Günther <admin@xenrox.net>
# Date 1656707251 -7200
#      Fri Jul 01 22:27:31 2022 +0200
# Node ID 028049d85eb74404324c5e5f0ea7ad563e5c56ac
# Parent  05667befed23319d7153f33ef64015aa79c97af0
api/webhooks: Add missing default case

diff --git a/api/graph/schema.resolvers.go b/api/graph/schema.resolvers.go
--- a/api/graph/schema.resolvers.go
+++ b/api/graph/schema.resolvers.go
@@ -417,6 +417,8 @@
		case model.WebhookEventRepoCreated, model.WebhookEventRepoUpdate,
			model.WebhookEventRepoDeleted:
			access = "REPOSITORIES"
		default:
			return nil, fmt.Errorf("Unsupported event %s", ev.String())
		}
		if !user.Grants.Has(access, auth.RO) {
			return nil, fmt.Errorf("Insufficient access granted for webhook event %s", ev.String())
Details
Message ID
<CL8FML1GZSOP.3UWY1GWM282NK@taiga>
In-Reply-To
<028049d85eb74404324c.1656707270@asgard> (view parent)
DKIM signature
pass
Download raw message
Applied, thanks!
Reply to thread Export thread (mbox)