Files
Gitea/routers
petervavrinecz a397e92c80 fix(issue): prevent redirect to external tracker when built-in tracker is enabled (#39997)
PR #39354 added support for enabling both internal and external trackers
concurrently and introduced separate navigation buttons.

However, as originally pointed out during code review on #39354
([comment](https://github.com/go-gitea/gitea/pull/39354#discussion_r4047774417)):
> *"With both trackers enabled and the built-in issue unit readable,
this redirect still runs whenever the external URL is nonempty, so
`/issues` never reaches the internal issue list in the new combined
configuration. Only redirect to the external tracker when the caller
cannot read the internal issue unit."*

`MustEnableIssues` in `routers/web/repo/issue.go` was still
unconditionally redirecting whenever `unit.TypeExternalTracker` is
enabled with a non-empty `ExternalTrackerURL`.

### Fix

In `routers/web/repo/issue.go`, only redirect to the external tracker
URL when the caller cannot read the built-in issue unit
(`!ctx.Repo.Permission.CanRead(unit.TypeIssues)`).

Signed-off-by: Vavrinecz Péter <98645804+petervavrinecz@users.noreply.github.com>
2026-10-26 08:12:14 -07:00
..
2026-09-23 23:14:31 +00:00