Browse Source

Add error direclty when user tries to create new repo and limit already hit (#1767)

tags/v1.2.0-rc1
Jonas Östanbäck Lunny Xiao 8 years ago
parent
commit
4e9dce79ad
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      routers/repo/repo.go

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

@@ -67,6 +67,10 @@ func checkContextUser(ctx *context.Context, uid int64) *models.User {

// Create render creating repository page
func Create(ctx *context.Context) {
if !ctx.User.CanCreateRepo() {
ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", ctx.User.RepoCreationNum()), tplCreate, nil)
}

ctx.Data["Title"] = ctx.Tr("new_repo")

// Give default value for template to render.


Loading…
Cancel
Save