Browse Source

Fix CanCreateRepo check (#15311) (#15321)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
tags/v1.14.0
6543 3 years ago
parent
commit
38d184d518
No account linked to committer's email address
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      routers/repo/repo.go

+ 3
- 0
routers/repo/repo.go View File

@@ -192,6 +192,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

Loading…
Cancel
Save