mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-04 03:35:05 +02:00
fix build errors
This commit is contained in:
parent
11f32528c6
commit
ea0340933d
@ -238,7 +238,7 @@ func MigratePost(ctx *context.Context) {
|
||||
opts.AWSSecretAccessKey = form.AWSSecretAccessKey
|
||||
}
|
||||
|
||||
err = repo_service.CheckCreateRepository(ctx, ctx.Doer, ctxUser, opts.RepoName, false)
|
||||
err = repo_service.CheckCreateRepository(ctx, ctx.Doer, ctxUser, opts.RepoName, 0, false)
|
||||
if err != nil {
|
||||
handleMigrateError(ctx, ctxUser, err, "MigratePost", tpl, form)
|
||||
return
|
||||
|
||||
@ -308,7 +308,7 @@ func HasWiki(ctx context.Context, repo *repo_model.Repository) bool {
|
||||
}
|
||||
|
||||
// CheckCreateRepository check if doer could create a repository in new owner
|
||||
func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, name string, overwriteOrAdopt bool) error {
|
||||
func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, name string, gid int64, overwriteOrAdopt bool) error {
|
||||
if !doer.CanCreateRepoIn(owner) {
|
||||
return repo_model.ErrReachLimitOfRepo{Limit: owner.MaxRepoCreation}
|
||||
}
|
||||
@ -317,13 +317,13 @@ func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, na
|
||||
return err
|
||||
}
|
||||
|
||||
has, err := repo_model.IsRepositoryModelExist(ctx, owner, name)
|
||||
has, err := repo_model.IsRepositoryModelExist(ctx, owner, name, gid)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if has {
|
||||
return repo_model.ErrRepoAlreadyExist{Uname: owner.Name, Name: name}
|
||||
}
|
||||
repo := repo_model.StorageRepo(repo_model.RelativePath(owner.Name, name))
|
||||
repo := repo_model.StorageRepo(repo_model.RelativePath(owner.Name, name, gid))
|
||||
isExist, err := gitrepo.IsRepositoryExist(ctx, repo)
|
||||
if err != nil {
|
||||
log.Error("Unable to check if %s exists. Error: %v", repo.RelativePath(), err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user