diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-04-01 01:31:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 19:31:53 +0200 |
commit | 420851ca1ff5c97cc31930f022daaff6f484793b (patch) | |
tree | 8fbf05e426c30db2ad2ea706d53cf2c60d4989c3 /modules/context/org.go | |
parent | c88547ce71a554091930e129c20776daf6da35ac (diff) | |
download | gitea-420851ca1ff5c97cc31930f022daaff6f484793b.tar.gz gitea-420851ca1ff5c97cc31930f022daaff6f484793b.zip |
Fix global packages enabled avaiable (#19276)
Fix #19275
Diffstat (limited to 'modules/context/org.go')
-rw-r--r-- | modules/context/org.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/context/org.go b/modules/context/org.go index f8607bd29f..427e4910c0 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -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 |