aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorEarl Warren <109468362+earl-warren@users.noreply.github.com>2023-07-19 15:21:51 +0200
committerGitHub <noreply@github.com>2023-07-19 21:21:51 +0800
commitad4c09b59f1657a5400c92913972e4cca578a4fb (patch)
tree8351737a41c17bfc132a4265311c23da0e405b74 /routers
parent0f9f6567bb8117dbc23f2cbc664c40a4816eb326 (diff)
downloadgitea-ad4c09b59f1657a5400c92913972e4cca578a4fb.tar.gz
gitea-ad4c09b59f1657a5400c92913972e4cca578a4fb.zip
parseScope with owner/repo always sets owner to zero (#25987)
Refs: https://codeberg.org/forgejo/forgejo/pulls/1001
Diffstat (limited to 'routers')
-rw-r--r--routers/private/actions.go3
1 files changed, 2 insertions, 1 deletions
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)