···312 // notify about the issue closure
313 rp.notifier.NewIssueState(r.Context(), syntax.DID(user.Did), issue)
314315- rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", f.OwnerSlashRepo(), issue.IssueId))
0316 return
317 } else {
318 l.Error("user is not permitted to close issue")
···362 // notify about the issue reopen
363 rp.notifier.NewIssueState(r.Context(), syntax.DID(user.Did), issue)
364365- rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", f.OwnerSlashRepo(), issue.IssueId))
0366 return
367 } else {
368 l.Error("user is not the owner of the repo")
···466 }
467 rp.notifier.NewIssueComment(r.Context(), &comment, mentions)
468469- rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d#comment-%d", f.OwnerSlashRepo(), issue.IssueId, commentId))
0470}
471472func (rp *Issues) IssueComment(w http.ResponseWriter, r *http.Request) {
···988 }
989 }
990 rp.notifier.NewIssue(r.Context(), issue, mentions)
991- rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", f.OwnerSlashRepo(), issue.IssueId))
00992 return
993 }
994}
···312 // notify about the issue closure
313 rp.notifier.NewIssueState(r.Context(), syntax.DID(user.Did), issue)
314315+ ownerSlashRepo := reporesolver.GetBaseRepoPath(r, &f.Repo)
316+ rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", ownerSlashRepo, issue.IssueId))
317 return
318 } else {
319 l.Error("user is not permitted to close issue")
···363 // notify about the issue reopen
364 rp.notifier.NewIssueState(r.Context(), syntax.DID(user.Did), issue)
365366+ ownerSlashRepo := reporesolver.GetBaseRepoPath(r, &f.Repo)
367+ rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", ownerSlashRepo, issue.IssueId))
368 return
369 } else {
370 l.Error("user is not the owner of the repo")
···468 }
469 rp.notifier.NewIssueComment(r.Context(), &comment, mentions)
470471+ ownerSlashRepo := reporesolver.GetBaseRepoPath(r, &f.Repo)
472+ rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d#comment-%d", ownerSlashRepo, issue.IssueId, commentId))
473}
474475func (rp *Issues) IssueComment(w http.ResponseWriter, r *http.Request) {
···991 }
992 }
993 rp.notifier.NewIssue(r.Context(), issue, mentions)
994+995+ ownerSlashRepo := reporesolver.GetBaseRepoPath(r, &f.Repo)
996+ rp.pages.HxLocation(w, fmt.Sprintf("/%s/issues/%d", ownerSlashRepo, issue.IssueId))
997 return
998 }
999}
+2-2
appview/middleware/middleware.go
···164 ok, err := mw.enforcer.E.Enforce(actor.Did, f.Knot, f.DidSlashRepo(), requiredPerm)
165 if err != nil || !ok {
166 // we need a logged in user
167- log.Printf("%s does not have perms of a %s in repo %s", actor.Did, requiredPerm, f.OwnerSlashRepo())
168 http.Error(w, "Forbiden", http.StatusUnauthorized)
169 return
170 }
···327 return
328 }
329330- fullName := f.OwnerHandle() + "/" + f.Name
331332 if r.Header.Get("User-Agent") == "Go-http-client/1.1" {
333 if r.URL.Query().Get("go-get") == "1" {
···164 ok, err := mw.enforcer.E.Enforce(actor.Did, f.Knot, f.DidSlashRepo(), requiredPerm)
165 if err != nil || !ok {
166 // we need a logged in user
167+ log.Printf("%s does not have perms of a %s in repo %s", actor.Did, requiredPerm, f.DidSlashRepo())
168 http.Error(w, "Forbiden", http.StatusUnauthorized)
169 return
170 }
···327 return
328 }
329330+ fullName := reporesolver.GetBaseRepoPath(r, &f.Repo)
331332 if r.Header.Get("User-Agent") == "Go-http-client/1.1" {
333 if r.URL.Query().Get("go-get") == "1" {