aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/projects.go
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-03-12 22:36:47 +0900
committerGitHub <noreply@github.com>2023-03-12 14:36:47 +0100
commita04eeb2a548d4fd2b63873fc2acff49c52e19723 (patch)
treee4536fc0c417db5e56e3d60f0dce384e1b299fb1 /routers/web/repo/projects.go
parente72290fd9aeb77a47311483d1d565e428ce40cd9 (diff)
downloadgitea-a04eeb2a548d4fd2b63873fc2acff49c52e19723.tar.gz
gitea-a04eeb2a548d4fd2b63873fc2acff49c52e19723.zip
Show edit/close/delete button on organization wide repositories (#23388)
A part of https://github.com/go-gitea/gitea/pull/22865
Diffstat (limited to 'routers/web/repo/projects.go')
-rw-r--r--routers/web/repo/projects.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/projects.go b/routers/web/repo/projects.go
index 29bd59c7a3..e15f548a38 100644
--- a/routers/web/repo/projects.go
+++ b/routers/web/repo/projects.go
@@ -113,7 +113,7 @@ func Projects(ctx *context.Context) {
pager.AddParam(ctx, "state", "State")
ctx.Data["Page"] = pager
- ctx.Data["CanWriteProjects"] = true
+ ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(unit.TypeProjects)
ctx.Data["IsShowClosed"] = isShowClosed
ctx.Data["IsProjectsPage"] = true
ctx.Data["SortType"] = sortType