diff options
Diffstat (limited to 'modules/context/org.go')
-rw-r--r-- | modules/context/org.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/context/org.go b/modules/context/org.go index 11521c452b..d4159a32a7 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -117,6 +117,10 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { } ctx.Data["IsOrganizationOwner"] = ctx.Org.IsOwner ctx.Data["IsOrganizationMember"] = ctx.Org.IsMember + ctx.Data["IsPublicMember"] = func(uid int64) bool { + is, _ := models.IsPublicMembership(ctx.Org.Organization.ID, uid) + return is + } ctx.Data["CanCreateOrgRepo"] = ctx.Org.CanCreateOrgRepo ctx.Org.OrgLink = org.AsUser().OrganisationLink() |