Add config to enable "public" namespaces

These are namespaces that will be displayed in the repo list view, regardless of whether the user is a member.
This commit is contained in:
Joseph Schorr 2017-08-07 15:59:06 -04:00
parent dff4207a89
commit 650dbe5f5b
3 changed files with 19 additions and 4 deletions

View file

@ -11,7 +11,7 @@
}]);
function RepoListCtrl($scope, $sanitize, $q, Restangular, UserService, ApiService, Features) {
function RepoListCtrl($scope, $sanitize, $q, Restangular, UserService, ApiService, Features, Config) {
$scope.namespace = null;
$scope.page = 1;
$scope.publicPageCount = null;
@ -35,7 +35,8 @@
user.organizations.map(function(org) {
$scope.namespaces.push({
'name': org.name,
'avatar': org.avatar
'avatar': org.avatar,
'public': org.public
});
});
@ -99,7 +100,8 @@
var options = {
'namespace': namespace.name,
'last_modified': true,
'popularity': true
'popularity': true,
'public': namespace.public
};
namespace.repositories = ApiService.listReposAsResource().withOptions(options).get(function(resp) {