mirror of
https://github.com/go-gitea/gitea.git
synced 2025-01-04 09:17:43 +03:00
Ignore view_as param when the profiles not both exist
This commit is contained in:
parent
86e698dc16
commit
e95d7166ed
@ -124,6 +124,7 @@ func home(ctx *context.Context, viewRepositories bool) {
|
||||
ctx.ServerError("RenderOrgHeader", err)
|
||||
return
|
||||
}
|
||||
isBothProfilesExist := ctx.Data["HasPublicProfileReadme"] == true && ctx.Data["HasPrivateProfileReadme"] == true
|
||||
|
||||
isViewerMember := ctx.FormString("view_as")
|
||||
ctx.Data["IsViewerMember"] = isViewerMember == "member"
|
||||
@ -133,7 +134,7 @@ func home(ctx *context.Context, viewRepositories bool) {
|
||||
profileType = "Private"
|
||||
}
|
||||
|
||||
if isViewerMember == "" {
|
||||
if !isBothProfilesExist {
|
||||
if !prepareOrgProfileReadme(ctx, viewRepositories, "Public") {
|
||||
if !prepareOrgProfileReadme(ctx, viewRepositories, "Private") {
|
||||
ctx.Data["PageIsViewRepositories"] = true
|
||||
|
Loading…
Reference in New Issue
Block a user