aboutsummaryrefslogtreecommitdiffstats
path: root/modules/repository
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-05-24 18:12:40 +0100
committerGitHub <noreply@github.com>2020-05-24 18:12:40 +0100
commit3547e84a050ab5a32c1616bdb95d1fdee2cbd006 (patch)
tree66ad559653006be91bdda9f813f3e70a2d8672f3 /modules/repository
parente25348da889718f2116f23e25aacb10ca8aee2a3 (diff)
downloadgitea-3547e84a050ab5a32c1616bdb95d1fdee2cbd006.tar.gz
gitea-3547e84a050ab5a32c1616bdb95d1fdee2cbd006.zip
When initialising repositories ensure that the user doing the creation is the initializer (#11601)
Fix #10760 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/repository')
-rw-r--r--modules/repository/create.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/repository/create.go b/modules/repository/create.go
index 5c0aae30da..2f7d10f0d1 100644
--- a/modules/repository/create.go
+++ b/modules/repository/create.go
@@ -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(