From 1ed9cf65615f492e60c76ff589da9570606bdbe8 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Wed, 23 Oct 2019 13:07:29 +0200 Subject: [PATCH] license: added a flag to allow hidding license info. --- configs/development.ini | 3 +++ configs/production.ini | 3 +++ rhodecode/lib/base.py | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/configs/development.ini b/configs/development.ini index 2997b474..cc432d6b 100644 --- a/configs/development.ini +++ b/configs/development.ini @@ -273,6 +273,9 @@ allow_custom_hooks_settings = true ## New generated token value can be found in Admin > settings > license page. license_token = +## This flag would hide sensitive information on the license page +license.hide_license_info = false + ## supervisor connection uri, for managing supervisor and logs. supervisor.uri = ## supervisord group name/id we only want this RC instance to handle diff --git a/configs/production.ini b/configs/production.ini index 1d6f34a7..6f84f375 100644 --- a/configs/production.ini +++ b/configs/production.ini @@ -248,6 +248,9 @@ allow_custom_hooks_settings = true ## New generated token value can be found in Admin > settings > license page. license_token = +## This flag would hide sensitive information on the license page +license.hide_license_info = false + ## supervisor connection uri, for managing supervisor and logs. supervisor.uri = ## supervisord group name/id we only want this RC instance to handle diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py index 571b8368..b4b0a208 100644 --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -363,6 +363,10 @@ def attach_context_attributes(context, request, user_id=None): context.visual.cut_off_limit_file = safe_int( config.get('cut_off_limit_file')) + context.license = AttributeDict({}) + context.license.hide_license_info = str2bool( + config.get('license.hide_license_info', False)) + # AppEnlight context.appenlight_enabled = str2bool(config.get('appenlight', 'false')) context.appenlight_api_public_key = config.get(