diff options
author | Andrew Bezold <andrew.bezold@gmail.com> | 2020-04-30 11:11:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 16:11:56 +0100 |
commit | 3dc6af3d70285b72feb52a41b6ec0bcb9e62aa8b (patch) | |
tree | 81d953d12c90da5656a253a4c5fbde192acb1fa7 /models | |
parent | 28e5e7fcbca9cd2030c156ec45f6f3cf67b3682e (diff) | |
download | gitea-3dc6af3d70285b72feb52a41b6ec0bcb9e62aa8b.tar.gz gitea-3dc6af3d70285b72feb52a41b6ec0bcb9e62aa8b.zip |
Fix creation of Organization repos by Users with max created personal repos (#11183)
* Fix creation of Org repos
Fix go-gitea#9269
* Change variable name to appease linter
* Update PR with suggestions
Add a note for user.CanCreateRepo() about failure assumptions
Change repo.create help message
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'models')
-rw-r--r-- | models/user.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go index 50635273bd..a89eb144ce 100644 --- a/models/user.go +++ b/models/user.go @@ -279,6 +279,7 @@ func (u *User) MaxCreationLimit() int { } // CanCreateRepo returns if user login can create a repository +// NOTE: functions calling this assume a failure due to repository count limit; if new checks are added, those functions should be revised func (u *User) CanCreateRepo() bool { if u.IsAdmin { return true |