Projet

Général

Profil

0001-misc-disable-usersearch-cell-by-default-15237.patch

Frédéric Péters, 23 octobre 2018 21:01

Télécharger (1,75 ko)

Voir les différences:

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(-)
combo/apps/usersearch/models.py
14 14
# You should have received a copy of the GNU Affero General Public License
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17
from django.conf import settings
17 18
from django.utils.translation import ugettext_lazy as _
18 19
from django.contrib.auth.models import User
19 20

  
......
31 32
    class Meta:
32 33
        verbose_name = _('User Search')
33 34

  
35
    @classmethod
36
    def is_enabled(cls):
37
        return settings.USERSEARCH_CELL_ENABLED
38

  
34 39
    def is_visible(self, user=None):
35 40
        return super(UserSearchCell, self).is_visible(user=user)
36 41

  
combo/settings.py
313 313

  
314 314
WCS_FORM_ASSET_SLOTS = {}
315 315

  
316
# hide work-in-progress/experimental/whatever cells for now
316
# hide work-in-progress/experimental/broken/legacy/whatever cells for now
317 317
BOOKING_CALENDAR_CELL_ENABLED = False
318 318
NEWSLETTERS_CELL_ENABLED = False
319
USERSEARCH_CELL_ENABLED = False
319 320

  
320 321
local_settings_file = os.environ.get('COMBO_SETTINGS_FILE',
321 322
        os.path.join(os.path.dirname(__file__), 'local_settings.py'))
322
-