Explorar el Código

When initialising repositories ensure that the user doing the creation is the initializer (#11601) (#11608)

Backport #11601

Fix #10760

Signed-off-by: Andrew Thornton <art27@cantab.net>
tags/v1.12.0-rc2
zeripath hace 4 años
padre
commit
5e3dd3fafe
No account linked to committer's email address
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      modules/repository/create.go

+ 1
- 1
modules/repository/create.go Ver fichero

@@ -47,7 +47,7 @@ func CreateRepository(doer, u *models.User, opts models.CreateRepoOptions) (_ *m
// No need for init mirror.
if !opts.IsMirror {
repoPath := models.RepoPath(u.Name, repo.Name)
if err = initRepository(ctx, repoPath, u, repo, opts); err != nil {
if err = initRepository(ctx, repoPath, doer, repo, opts); err != nil {
if err2 := os.RemoveAll(repoPath); err2 != nil {
log.Error("initRepository: %v", err)
return fmt.Errorf(

Cargando…
Cancelar
Guardar