parent
c88547ce71
commit
420851ca1f
5 changed files with 32 additions and 19 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"code.gitea.io/gitea/models/organization"
|
||||
"code.gitea.io/gitea/models/perm"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
)
|
||||
|
||||
// Organization contains organization context
|
||||
|
@ -119,6 +120,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
|
|||
}
|
||||
ctx.Data["IsOrganizationOwner"] = ctx.Org.IsOwner
|
||||
ctx.Data["IsOrganizationMember"] = ctx.Org.IsMember
|
||||
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
|
||||
ctx.Data["IsPublicMember"] = func(uid int64) bool {
|
||||
is, _ := organization.IsPublicMembership(ctx.Org.Organization.ID, uid)
|
||||
return is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue