diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/install.go | 5 | ||||
-rw-r--r-- | routers/user/home.go | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/routers/install.go b/routers/install.go index 516d11e4aa..c63ac6909c 100644 --- a/routers/install.go +++ b/routers/install.go @@ -54,11 +54,12 @@ func GlobalInit() { log.Trace("Log path: %s", setting.LogRootPath) mailer.NewMailerContext() models.LoadModelsConfig() - models.LoadRepoConfig() - models.NewRepoContext() NewServices() if setting.InstallLock { + models.LoadRepoConfig() + models.NewRepoContext() + if err := models.NewEngine(); err != nil { log.Fatal(4, "Fail to initialize ORM engine: %v", err) } diff --git a/routers/user/home.go b/routers/user/home.go index b5a789ae0e..186cbe41a7 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -32,7 +32,6 @@ func Dashboard(ctx *middleware.Context) { ctx.Handle(500, "home.Dashboard(GetOrganizations)", err) return } - ctx.Data["Orgs"] = ctx.User.Orgs ctx.Data["ContextUser"] = ctx.User repos, err := models.GetRepositories(ctx.User.Id, true) @@ -40,9 +39,6 @@ func Dashboard(ctx *middleware.Context) { ctx.Handle(500, "GetRepositories", err) return } - for _, repo := range repos { - repo.Owner = ctx.User - } ctx.Data["Repos"] = repos ctx.Data["CollaborativeRepos"], err = models.GetCollaborativeRepos(ctx.User.Name) |