aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2021-04-07 02:26:41 -0500
committerGitHub <noreply@github.com>2021-04-07 09:26:41 +0200
commit426ebbfc3b6b50fc7e1cb1e645716635b7cad947 (patch)
treeb047204d21b058455c2c5c5d3d07ab1899700e45 /routers/repo
parent75dfc46d7cbd7ac0d2c3f8dca5b65ab11afcc981 (diff)
downloadgitea-426ebbfc3b6b50fc7e1cb1e645716635b7cad947.tar.gz
gitea-426ebbfc3b6b50fc7e1cb1e645716635b7cad947.zip
Fix CanCreateRepo check (#15311)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/repo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 1ffbb1458d..b066fd315c 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -193,6 +193,9 @@ func CreatePost(ctx *context.Context) {
ctx.Data["Licenses"] = models.Licenses
ctx.Data["Readmes"] = models.Readmes
+ ctx.Data["CanCreateRepo"] = ctx.User.CanCreateRepo()
+ ctx.Data["MaxCreationLimit"] = ctx.User.MaxCreationLimit()
+
ctxUser := checkContextUser(ctx, form.UID)
if ctx.Written() {
return