commit
bb269a56b6
2 changed files with 12 additions and 0 deletions
|
@ -179,6 +179,9 @@ def get_action_counts(repository_ids):
|
|||
|
||||
def get_visible_repositories(username=None, include_public=True, page=None,
|
||||
limit=None, namespace=None, namespace_only=False):
|
||||
if not include_public and not username:
|
||||
return []
|
||||
|
||||
fields = [Repository.name, Repository.id, Repository.description, Visibility.name,
|
||||
Namespace.username]
|
||||
|
||||
|
|
|
@ -1305,6 +1305,15 @@ class TestListRepos(ApiTestCase):
|
|||
for repo in json['repositories']:
|
||||
self.assertEquals(ORGANIZATION, repo['namespace'])
|
||||
|
||||
def test_listrepos_asguest_allparams(self):
|
||||
json = self.getJsonResponse(RepositoryList,
|
||||
params=dict(namespace=ORGANIZATION,
|
||||
public=False,
|
||||
last_modified=True))
|
||||
|
||||
for repo in json['repositories']:
|
||||
self.assertEquals(ORGANIZATION, repo['namespace'])
|
||||
|
||||
|
||||
class TestViewPublicRepository(ApiTestCase):
|
||||
def test_normalview(self):
|
||||
|
|
Reference in a new issue