From ad4c09b59f1657a5400c92913972e4cca578a4fb Mon Sep 17 00:00:00 2001 From: Earl Warren <109468362+earl-warren@users.noreply.github.com> Date: Wed, 19 Jul 2023 15:21:51 +0200 Subject: [PATCH] parseScope with owner/repo always sets owner to zero (#25987) Refs: https://codeberg.org/forgejo/forgejo/pulls/1001 --- routers/private/actions.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/private/actions.go b/routers/private/actions.go index b7e416f56a..2403b9c41a 100644 --- a/routers/private/actions.go +++ b/routers/private/actions.go @@ -77,9 +77,10 @@ func parseScope(ctx *context.PrivateContext, scope string) (ownerID, repoID int6 if err != nil { return ownerID, repoID, err } + ownerID = u.ID if !found { - return u.ID, repoID, nil + return ownerID, repoID, nil } r, err := repo_model.GetRepositoryByName(u.ID, repoName)