parent
679044574a
commit
7e4b23916a
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,
|
def get_visible_repositories(username=None, include_public=True, page=None,
|
||||||
limit=None, namespace=None, namespace_only=False):
|
limit=None, namespace=None, namespace_only=False):
|
||||||
|
if not include_public and not username:
|
||||||
|
return []
|
||||||
|
|
||||||
fields = [Repository.name, Repository.id, Repository.description, Visibility.name,
|
fields = [Repository.name, Repository.id, Repository.description, Visibility.name,
|
||||||
Namespace.username]
|
Namespace.username]
|
||||||
|
|
||||||
|
|
|
@ -1305,6 +1305,15 @@ class TestListRepos(ApiTestCase):
|
||||||
for repo in json['repositories']:
|
for repo in json['repositories']:
|
||||||
self.assertEquals(ORGANIZATION, repo['namespace'])
|
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):
|
class TestViewPublicRepository(ApiTestCase):
|
||||||
def test_normalview(self):
|
def test_normalview(self):
|
||||||
|
|
Reference in a new issue