From e9209b67c3cf8201ffc094bfc73bc2438d16d6f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 6 Nov 2015 21:37:45 +0100 Subject: [PATCH] misc: don't consider cell if there's no user --- combo_plugin_subscriptions/models.py | 4 ++++ 1 file changed, 4 insertions(+) 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'' % self.passerelle_url + + def is_relevant(self, context): + # the cell is only relevant for connected users + return bool(context.get('user').is_authenticated())