summaryrefslogtreecommitdiffstats
path: root/services/repository/transfer.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/transfer.go')
-rw-r--r--services/repository/transfer.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/repository/transfer.go b/services/repository/transfer.go
index 3feeb68f22..ae15383240 100644
--- a/services/repository/transfer.go
+++ b/services/repository/transfer.go
@@ -11,6 +11,7 @@ import (
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/models/perm"
+ access_model "code.gitea.io/gitea/models/perm/access"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/log"
@@ -105,7 +106,7 @@ func StartRepositoryTransfer(doer, newOwner *user_model.User, repo *repo_model.R
}
// In case the new owner would not have sufficient access to the repo, give access rights for read
- hasAccess, err := models.HasAccess(newOwner.ID, repo)
+ hasAccess, err := access_model.HasAccess(db.DefaultContext, newOwner.ID, repo)
if err != nil {
return err
}
@@ -113,7 +114,7 @@ func StartRepositoryTransfer(doer, newOwner *user_model.User, repo *repo_model.R
if err := models.AddCollaborator(repo, newOwner); err != nil {
return err
}
- if err := models.ChangeCollaborationAccessMode(repo, newOwner.ID, perm.AccessModeRead); err != nil {
+ if err := repo_model.ChangeCollaborationAccessMode(repo, newOwner.ID, perm.AccessModeRead); err != nil {
return err
}
}