mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Refactor issue page info (#32445)
Fix a longstanding TODO since 2021 (#14826) / 2018 (#2531)
This commit is contained in:
@ -1443,11 +1443,11 @@ func ViewIssue(ctx *context.Context) {
|
||||
}
|
||||
|
||||
if issue.IsPull && !ctx.Repo.CanRead(unit.TypeIssues) {
|
||||
ctx.Data["IssueType"] = "pulls"
|
||||
ctx.Data["IssueDependencySearchType"] = "pulls"
|
||||
} else if !issue.IsPull && !ctx.Repo.CanRead(unit.TypePullRequests) {
|
||||
ctx.Data["IssueType"] = "issues"
|
||||
ctx.Data["IssueDependencySearchType"] = "issues"
|
||||
} else {
|
||||
ctx.Data["IssueType"] = "all"
|
||||
ctx.Data["IssueDependencySearchType"] = "all"
|
||||
}
|
||||
|
||||
ctx.Data["IsProjectsEnabled"] = ctx.Repo.CanRead(unit.TypeProjects)
|
||||
|
Reference in New Issue
Block a user