Use dynamic package type list (#22263)

Replace the hardcoded list with the dynamic list.
This commit is contained in:
KN4CK3R authored and GitHub committed 2022-12-29 00:31:54 +01:00
1 parent ca67c5a8a7
commit 309e86a9bf
5 files changed
+9 -24

No files matched your search

+1
View File
@@ -61,6 +61,7 @@ func Packages(ctx *context.Context) {
ctx.Data["ContextUser"] = ctx.ContextUser
ctx.Data["Query"] = query
ctx.Data["PackageType"] = packageType
ctx.Data["AvailableTypes"] = packages.TypeList
ctx.Data["HasPackages"] = hasPackages
if ctx.Repo != nil {
ctx.Data["CanWritePackages"] = ctx.IsUserRepoWriter([]unit.Type{unit.TypePackages}) || ctx.IsUserSiteAdmin()