From cbb0f0073b5904b25cdc5a5686784ca5f39623f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 23 Oct 2018 20:56:16 +0200 Subject: [PATCH] misc: disable usersearch cell by default (#15237) --- combo/apps/usersearch/models.py | 5 +++++ combo/settings.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/combo/apps/usersearch/models.py b/combo/apps/usersearch/models.py index 07fe78e5..f1f38c18 100644 --- a/combo/apps/usersearch/models.py +++ b/combo/apps/usersearch/models.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User @@ -31,6 +32,10 @@ class UserSearchCell(CellBase): class Meta: verbose_name = _('User Search') + @classmethod + def is_enabled(cls): + return settings.USERSEARCH_CELL_ENABLED + def is_visible(self, user=None): return super(UserSearchCell, self).is_visible(user=user) diff --git a/combo/settings.py b/combo/settings.py index 2cedd2de..5e999efe 100644 --- a/combo/settings.py +++ b/combo/settings.py @@ -313,9 +313,10 @@ WCS_CATEGORY_ASSET_SLOTS = { WCS_FORM_ASSET_SLOTS = {} -# hide work-in-progress/experimental/whatever cells for now +# hide work-in-progress/experimental/broken/legacy/whatever cells for now BOOKING_CALENDAR_CELL_ENABLED = False NEWSLETTERS_CELL_ENABLED = False +USERSEARCH_CELL_ENABLED = False local_settings_file = os.environ.get('COMBO_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')) -- 2.19.1