aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/attachment.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/attachment.go')
-rw-r--r--routers/web/repo/attachment.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/repo/attachment.go b/routers/web/repo/attachment.go
index c930311f70..b05d6448d9 100644
--- a/routers/web/repo/attachment.go
+++ b/routers/web/repo/attachment.go
@@ -9,6 +9,7 @@ import (
"net/http"
"code.gitea.io/gitea/models"
+ access_model "code.gitea.io/gitea/models/perm/access"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/httpcache"
@@ -106,7 +107,7 @@ func GetAttachment(ctx *context.Context) {
return
}
} else { // If we have the repository we check access
- perm, err := models.GetUserRepoPermission(ctx, repository, ctx.Doer)
+ perm, err := access_model.GetUserRepoPermission(ctx, repository, ctx.Doer)
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetUserRepoPermission", err.Error())
return