From e8cdc942e861df5b96d9e57fb8edabb9d97467f0 Mon Sep 17 00:00:00 2001 From: lian Date: Thu, 14 May 2015 13:36:03 +0800 Subject: [PATCH] [api] update repos view do not return sub-repo info if sub-repo is not enabled --- seahub/api2/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/seahub/api2/views.py b/seahub/api2/views.py index eea01b3e1e..56be842c1f 100644 --- a/seahub/api2/views.py +++ b/seahub/api2/views.py @@ -529,6 +529,9 @@ class Repos(APIView): filter_by[f] = True email = request.user.username + if not UserOptions.objects.is_sub_lib_enabled(email): + filter_by['sub'] = False + repos_json = [] if filter_by['mine']: owned_repos = get_owned_repo_list(request)