summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2015-11-06 20:37:45 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2015-11-06 20:37:45 (GMT)
commite9209b67c3cf8201ffc094bfc73bc2438d16d6f5 (patch)
tree2f77bfff54472d76a3ac4dc77041ce12d4697cf1
parent2cbbc58c4be5f671e6a1ba6f1ae21ef377d6993d (diff)
downloadcombo-plugin-subscriptions-e9209b67c3cf8201ffc094bfc73bc2438d16d6f5.zip
combo-plugin-subscriptions-e9209b67c3cf8201ffc094bfc73bc2438d16d6f5.tar.gz
combo-plugin-subscriptions-e9209b67c3cf8201ffc094bfc73bc2438d16d6f5.tar.bz2
misc: don't consider cell if there's no userv0.5
-rw-r--r--combo_plugin_subscriptions/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/combo_plugin_subscriptions/models.py b/combo_plugin_subscriptions/models.py
index f1987ed..b63ec7d 100644
--- a/combo_plugin_subscriptions/models.py
+++ b/combo_plugin_subscriptions/models.py
@@ -154,3 +154,7 @@ class SubscriptionsManageCell(CellBase):
def __unicode__(self):
return u'<SubscriptionsManagePlugin %s>' % self.passerelle_url
+
+ def is_relevant(self, context):
+ # the cell is only relevant for connected users
+ return bool(context.get('user').is_authenticated())