From: Mats Sjöberg Date: Tue, 21 May 2013 19:42:41 +0000 (+0300) Subject: Piwigo: return collections list only to logged in users. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7da90d56d14d47e9d5b124a42a5d9e1101a603e0;p=mediagoblin.git Piwigo: return collections list only to logged in users. --- diff --git a/mediagoblin/plugins/piwigo/views.py b/mediagoblin/plugins/piwigo/views.py index c348fd54..250bf758 100644 --- a/mediagoblin/plugins/piwigo/views.py +++ b/mediagoblin/plugins/piwigo/views.py @@ -87,12 +87,13 @@ def pwg_categories_getList(request): 'uppercats': "-29711", 'name': "All my images"}] - for c in collections: - catlist.append({'id': c.id, - 'uppercats': str(c.id), - 'name': c.title, - 'comment': c.description - }) + if request.user: + for c in collections: + catlist.append({'id': c.id, + 'uppercats': str(c.id), + 'name': c.title, + 'comment': c.description + }) return { 'categories': PwgNamedArray(