fix: do permission check for repository redirect

This commit is contained in:
Gusted
2025-08-30 09:37:34 +02:00
committed by Earl Warren
parent 50837322cc
commit ca7fcacddc
6 changed files with 46 additions and 19 deletions
+1 -1
View File
@@ -520,7 +520,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
repo, err := repo_model.GetRepositoryByName(ctx, owner.ID, repoName)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
redirectRepoID, err := repo_model.LookupRedirect(ctx, owner.ID, repoName)
redirectRepoID, err := redirect_service.LookupRepoRedirect(ctx, ctx.Doer, owner.ID, repoName)
if err == nil {
RedirectToRepo(ctx.Base, redirectRepoID)
} else if repo_model.IsErrRedirectNotExist(err) {