Make sure to show public repos on the user and orgs pages

This commit is contained in:
Joseph Schorr 2015-04-03 14:55:09 -04:00
parent 2d8237bd83
commit 4cb7921c3a
6 changed files with 23 additions and 8 deletions

View file

@ -109,6 +109,8 @@ class RepositoryList(ApiResource):
@query_param('sort', 'Whether to sort the results.', type=truthy_bool, default=False)
@query_param('count', 'Whether to include a count of the total number of results available.',
type=truthy_bool, default=False)
@query_param('namespace_only', 'Whether to limit only to the given namespace.',
type=truthy_bool, default=False)
def get(self, args):
"""Fetch the list of repositories under a variety of situations."""
username = None
@ -129,7 +131,8 @@ class RepositoryList(ApiResource):
repo_query = model.get_visible_repositories(username, limit=args['limit'], page=args['page'],
include_public=args['public'], sort=args['sort'],
namespace=args['namespace'])
namespace=args['namespace'],
namespace_only=args['namespace_only'])
def repo_view(repo_obj):
repo = {
'namespace': repo_obj.namespace_user.username,