mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Use dynamic package type list (#22263)
Replace the hardcoded list with the dynamic list.
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user