MCPcopy Create free account
hub / github.com/gogs/gogs / canCreateRepo

Method canCreateRepo

internal/database/users.go:1321–1323  ·  view source on GitHub ↗

canCreateRepo returns true if the user can create a repository.

()

Source from the content-addressed store, hash-verified

1319
1320// canCreateRepo returns true if the user can create a repository.
1321func (u *User) canCreateRepo() bool {
1322 return u.maxNumRepos() <= -1 || u.NumRepos < u.maxNumRepos()
1323}
1324
1325// CanCreateOrganization returns true if user can create organizations.
1326func (u *User) CanCreateOrganization() bool {

Callers 2

CreateRepositoryFunction · 0.80
ForkRepositoryFunction · 0.80

Implementers 1

mailerUserinternal/database/issue_mail.go

Calls 1

maxNumReposMethod · 0.95

Tested by

no test coverage detected