[extensions-web] extensions: Make sure to enforce visibility constraints



commit f42330f597461f4b56dc3d8baf8181d9aae5bcd4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Jun 26 11:20:20 2012 -0400

    extensions: Make sure to enforce visibility constraints

 sweettooth/extensions/views.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 10ea820..a7c4387 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -90,7 +90,7 @@ def shell_update(request):
 
     for uuid, version in installed.iteritems():
         try:
-            extension = models.Extension.objects.get(uuid=uuid)
+            extension = models.Extension.objects.visible().get(uuid=uuid)
         except models.Extension.DoesNotExist:
             continue
 
@@ -245,7 +245,7 @@ def ajax_adjust_popularity_view(request):
     uuid = request.POST['uuid']
     action = request.POST['action']
 
-    extension = models.Extension.objects.get(uuid=uuid)
+    extension = models.Extension.objects.visible().get(uuid=uuid)
     pop = models.ExtensionPopularityItem(extension=extension)
 
     if action == 'enable':



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]