mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-21 11:00:28 +02:00
...
This commit is contained in:
parent
640004f70f
commit
621c0e2b50
@ -110,7 +110,7 @@ func reqPackageAccess(accessMode perm.AccessMode) func(ctx *context.Context) {
|
||||
// If package is not linked to any repo (org-level package), deny access from Actions
|
||||
// Actions tokens should only access packages linked to repos
|
||||
if packageRepoID == 0 {
|
||||
if packageName := ctx.Params("packagename"); packageName != "" && ctx.Package.Owner != nil {
|
||||
if packageName := ctx.PathParam("packagename"); packageName != "" && ctx.Package.Owner != nil {
|
||||
pkg, err := packages_model.GetPackageByName(ctx, ctx.Package.Owner.ID, packages_model.TypeGeneric, packageName)
|
||||
if err == nil && pkg != nil {
|
||||
packageRepoID = pkg.RepoID
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user