Skip to content

Commit a1e4d7b

Browse files
author
Mithilesh Gupta
committed
Fix #35763: Added check to ensure project is in organization
1 parent f9d69e5 commit a1e4d7b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

routers/web/org/projects.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,11 @@ func ViewProject(ctx *context.Context) {
436436
ctx.Data["Project"] = project
437437
ctx.Data["IssuesMap"] = issuesMap
438438
ctx.Data["Columns"] = columns
439-
ctx.Data["Title"] = fmt.Sprintf("%s - %s", project.Title, ctx.Org.Organization.DisplayName())
439+
ctx.Data["Title"] = project.Title
440+
441+
if ctx.ContextUser.IsOrganization() {
442+
ctx.Data["Title"] = fmt.Sprintf("%s - %s", project.Title, ctx.Org.Organization.DisplayName())
443+
}
440444

441445
if _, err := shared_user.RenderUserOrgHeader(ctx); err != nil {
442446
ctx.ServerError("RenderUserOrgHeader", err)

0 commit comments

Comments
 (0)