diff options
author | Gusted <williamzijl7@hotmail.com> | 2021-11-26 07:06:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 07:06:26 +0000 |
commit | 04517e17d6c87f9c99a3fbc0b3cd782e311b5014 (patch) | |
tree | ec56d42d9906f06c1a90478f4406d8559f19ad73 /modules/notification | |
parent | 3a222ee416d448c6eedf9b2ed7e3ac2d25e0189f (diff) | |
download | gitea-04517e17d6c87f9c99a3fbc0b3cd782e311b5014.tar.gz gitea-04517e17d6c87f9c99a3fbc0b3cd782e311b5014.zip |
Use correct user on releases (#17818)
- Backport #17806
Diffstat (limited to 'modules/notification')
-rw-r--r-- | modules/notification/webhook/webhook.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/notification/webhook/webhook.go b/modules/notification/webhook/webhook.go index 55169be3b5..465455da15 100644 --- a/modules/notification/webhook/webhook.go +++ b/modules/notification/webhook/webhook.go @@ -766,12 +766,12 @@ func sendReleaseHook(doer *models.User, rel *models.Release, action api.HookRele return } - mode, _ := models.AccessLevel(rel.Publisher, rel.Repo) + mode, _ := models.AccessLevel(doer, rel.Repo) if err := webhook_services.PrepareWebhooks(rel.Repo, models.HookEventRelease, &api.ReleasePayload{ Action: action, Release: convert.ToRelease(rel), Repository: convert.ToRepo(rel.Repo, mode), - Sender: convert.ToUser(rel.Publisher, nil), + Sender: convert.ToUser(doer, nil), }); err != nil { log.Error("PrepareWebhooks: %v", err) } |