1
0
Fork 0
forked from forgejo/forgejo

Add user/organization code search (#19977)

Fixes #19925 

Screenshots:

![attels](https://user-images.githubusercontent.com/165205/173864718-fe789429-55bc-4cad-808c-9f02f335cddf.png)
This commit is contained in:
Lauris BH 2022-10-11 02:12:03 +03:00 committed by GitHub
parent 3ccebf7f40
commit b59b0cad0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 355 additions and 159 deletions

View file

@ -130,6 +130,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["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
ctx.Data["IsPublicMember"] = func(uid int64) bool {
is, _ := organization.IsPublicMembership(ctx.Org.Organization.ID, uid)
return is