···312312 // notify about the issue closure313313 rp.notifier.NewIssueState(r.Context(), syntax.DID(user.Did), issue)314314315315- rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", f.OwnerSlashRepo(), issue.IssueId))315315+ ownerSlashRepo := reporesolver.GetBaseRepoPath(r, &f.Repo)316316+ rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", ownerSlashRepo, issue.IssueId))316317 return317318 } else {318319 l.Error("user is not permitted to close issue")···363362 // notify about the issue reopen364363 rp.notifier.NewIssueState(r.Context(), syntax.DID(user.Did), issue)365364366366- rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", f.OwnerSlashRepo(), issue.IssueId))365365+ ownerSlashRepo := reporesolver.GetBaseRepoPath(r, &f.Repo)366366+ rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", ownerSlashRepo, issue.IssueId))367367 return368368 } else {369369 l.Error("user is not the owner of the repo")···468466 }469467 rp.notifier.NewIssueComment(r.Context(), &comment, mentions)470468471471- rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d#comment-%d", f.OwnerSlashRepo(), issue.IssueId, commentId))469469+ ownerSlashRepo := reporesolver.GetBaseRepoPath(r, &f.Repo)470470+ rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d#comment-%d", ownerSlashRepo, issue.IssueId, commentId))472471}473472474473func (rp *Issues) IssueComment(w http.ResponseWriter, r *http.Request) {···991988 }992989 }993990 rp.notifier.NewIssue(r.Context(), issue, mentions)994994- rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", f.OwnerSlashRepo(), issue.IssueId))991991+992992+ ownerSlashRepo := reporesolver.GetBaseRepoPath(r, &f.Repo)993993+ rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", ownerSlashRepo, issue.IssueId))995994 return996995 }997996}
+2-2
appview/middleware/middleware.go
···164164 ok, err := mw.enforcer.E.Enforce(actor.Did, f.Knot, f.DidSlashRepo(), requiredPerm)165165 if err != nil || !ok {166166 // we need a logged in user167167- log.Printf("%s does not have perms of a %s in repo %s", actor.Did, requiredPerm, f.OwnerSlashRepo())167167+ log.Printf("%s does not have perms of a %s in repo %s", actor.Did, requiredPerm, f.DidSlashRepo())168168 http.Error(w, "Forbiden", http.StatusUnauthorized)169169 return170170 }···327327 return328328 }329329330330- fullName := f.OwnerHandle() + "/" + f.Name330330+ fullName := reporesolver.GetBaseRepoPath(r, &f.Repo)331331332332 if r.Header.Get("User-Agent") == "Go-http-client/1.1" {333333 if r.URL.Query().Get("go-get") == "1" {