aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user/package.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/user/package.go')
-rw-r--r--routers/web/user/package.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/web/user/package.go b/routers/web/user/package.go
index 1c33998db9..c9aa2471ef 100644
--- a/routers/web/user/package.go
+++ b/routers/web/user/package.go
@@ -12,6 +12,7 @@ import (
packages_model "code.gitea.io/gitea/models/packages"
container_model "code.gitea.io/gitea/models/packages/container"
"code.gitea.io/gitea/models/perm"
+ access_model "code.gitea.io/gitea/models/perm/access"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
@@ -67,7 +68,7 @@ func ListPackages(ctx *context.Context) {
continue
}
- permission, err := models.GetUserRepoPermission(ctx, pd.Repository, ctx.Doer)
+ permission, err := access_model.GetUserRepoPermission(ctx, pd.Repository, ctx.Doer)
if err != nil {
ctx.ServerError("GetUserRepoPermission", err)
return
@@ -177,7 +178,7 @@ func ViewPackageVersion(ctx *context.Context) {
hasRepositoryAccess := false
if pd.Repository != nil {
- permission, err := models.GetUserRepoPermission(ctx, pd.Repository, ctx.Doer)
+ permission, err := access_model.GetUserRepoPermission(ctx, pd.Repository, ctx.Doer)
if err != nil {
ctx.ServerError("GetUserRepoPermission", err)
return