Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix creation of Organization repos by Users with max created personal repos #11183

Merged
merged 6 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update PR with suggestions
Add a note for user.CanCreateRepo() about failure assumptions
Change repo.create help message
  • Loading branch information
AndrewBezold committed Apr 25, 2020
commit a0b44d5346cd5d3d0943b0d4d000a276bb905105
1 change: 1 addition & 0 deletions models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/create.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{end}}
</div>
</div>
<span class="help">Some organizations may not show up in the dropdown due to the maximum repository limit</span>
<span class="help">Some organizations may not show up in the dropdown due to a maximum repository count limit</span>
</div>

<div class="inline required field {{if .Err_RepoName}}error{{end}}">
Expand Down