deny endpoint access to system tracking feature based on license

This commit is contained in:
Chris Meyers
2016-03-04 09:11:39 -05:00
parent 09c5a189ed
commit cfeae51254
6 changed files with 82 additions and 12 deletions
+1 -1
View File
@@ -483,7 +483,7 @@ class BaseFactSerializer(BaseSerializer):
def get_fields(self):
ret = super(BaseFactSerializer, self).get_fields()
if 'module' in ret and feature_enabled('system_tracking'):
if 'module' in ret:
# TODO: the values_list may pull in a LOT of entries before the distinct is called
modules = Fact.objects.all().values_list('module', flat=True).distinct()
choices = [(o, o.title()) for o in modules]