diff --git a/services/context/repo.go b/services/context/repo.go index af8a6edf7f..a499046ef9 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -425,6 +425,11 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) { if ctx.Repo.Repository.Owner.IsOrganization() { isPinnedToOrg, _ := organization.IsRepoPinned(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.ID) ctx.Data["IsRepoPinnedToOrg"] = isPinnedToOrg + // Check if user is a member of the org for pin dropdown + if ctx.Doer != nil { + isMember, _ := organization.IsOrganizationMember(ctx, ctx.Repo.Repository.OwnerID, ctx.Doer.ID) + ctx.Data["IsOrganizationMember"] = isMember + } } ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty }