Closed
Description
- Gitea version (or commit ref): 04cbdf5 (current
master
)
While working on #9787, I need to rewrite models.GetRepositoryAccesses()
. This function is only used by ListMyRepos()
as a complement of GetUserRepositories()
. ListMyRepos()
works the API function:
// swagger:operation GET /user/repos user userCurrentListRepos
GetRepositoryAccesses()
is supposed to return all the repositories that the user has access to but does not own. The problem is that the unit test goes like:
Lines 90 to 96 in 04cbdf5
With the current data, this function should fail because user1
is a site administrator, so it's got access to all repositories. The test asserts that the function returns zero results.
My question is: is the unit test/fixture set wrong, or is it that the function is expected to ignore the is_admin
flag to return a shorter list?
Metadata
Metadata
Assignees
Labels
No labels