From 2a476a4f6b0e7577005029a71817258cea2e46c7 Mon Sep 17 00:00:00 2001 From: Nicholas Pease Date: Wed, 2 Aug 2023 23:47:00 +0000 Subject: [PATCH] Do not show profile if repository is private --- routers/web/shared/user/header.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/shared/user/header.go b/routers/web/shared/user/header.go index 516c853b02e3e..0ef93815a3320 100644 --- a/routers/web/shared/user/header.go +++ b/routers/web/shared/user/header.go @@ -85,7 +85,7 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) { func FindUserProfileReadme(ctx *context.Context) (profileGitRepo *git.Repository, profileReadmeBlob *git.Blob, profileClose func()) { profileDbRepo, err := repo_model.GetRepositoryByName(ctx.ContextUser.ID, ".profile") - if err == nil && !profileDbRepo.IsEmpty { + if err == nil && !profileDbRepo.IsEmpty && !profileDbRepo.IsPrivate { if profileGitRepo, err = git.OpenRepository(ctx, profileDbRepo.RepoPath()); err != nil { log.Error("FindUserProfileReadme failed to OpenRepository: %v", err) } else {