1
1
mirror of https://github.com/go-gitea/gitea synced 2025-12-07 13:28:25 +00:00
This commit is contained in:
wxiaoguang
2024-04-19 11:09:07 +08:00
parent ba9b124c34
commit 3f27d4ea8e
13 changed files with 82 additions and 37 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ func TestAPISearchRepo(t *testing.T) {
assert.Len(t, repoNames, expected.count)
for _, repo := range body.Data {
r := getRepo(t, repo.ID)
hasAccess, err := access_model.HasAccess(db.DefaultContext, userID, r)
hasAccess, err := access_model.HasAnyUnitAccess(db.DefaultContext, userID, r)
assert.NoError(t, err, "Error when checking if User: %d has access to %s: %v", userID, repo.FullName, err)
assert.True(t, hasAccess, "User: %d does not have access to %s", userID, repo.FullName)