From 5d95ffe3eb216845606b7652160865eb1dd58111 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 11 Dec 2015 15:11:13 -0500 Subject: [PATCH] #2155 The owner has reached maximum creation limit of 0 repositories --- README.md | 2 +- docker/README.md | 2 +- models/user.go | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 293f5c2190..99b585e2f6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gogits/gogs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -![](public/img/gogs-large-resize.png) +![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) ##### Current version: 0.7.42 Beta diff --git a/docker/README.md b/docker/README.md index b1ed9d4681..0e2b294794 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,6 +1,6 @@ # Docker for Gogs -Visit [Docker Hub](https://hub.docker.com/r/gogs/gogs/) or [QUAY](https://quay.io/repository/gogs/gogs) see all available tags. +Visit [Docker Hub](https://hub.docker.com/r/gogs/gogs/) or [Quay](https://quay.io/repository/gogs/gogs) see all available tags. ## Usage diff --git a/models/user.go b/models/user.go index cb9846f9fd..d1f06dea80 100644 --- a/models/user.go +++ b/models/user.go @@ -75,7 +75,7 @@ type User struct { // Remember visibility choice for convenience, true for private LastRepoVisibility bool - // Maximum repository creation limit, 0 means use gloabl default + // Maximum repository creation limit, -1 means use gloabl default MaxRepoCreation int `xorm:"NOT NULL DEFAULT -1"` // Permissions. @@ -138,7 +138,7 @@ func (u *User) RepoCreationNum() int { func (u *User) CanCreateRepo() bool { if u.MaxRepoCreation <= -1 { - if setting.Repository.MaxCreationLimit == -1 { + if setting.Repository.MaxCreationLimit <= -1 { return true } return u.NumRepos < setting.Repository.MaxCreationLimit @@ -475,6 +475,7 @@ func CreateUser(u *User) (err error) { u.Rands = GetUserSalt() u.Salt = GetUserSalt() u.EncodePasswd() + u.MaxRepoCreation = -1 sess := x.NewSession() defer sess.Close()