diff --git a/app/__init__.py b/app/__init__.py index 43a60abab..d59ad198b 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -168,17 +168,12 @@ def create_app(application): @application.context_processor def inject_feature_flags(): - feature_best_practices_enabled = application.config[ - "FEATURE_BEST_PRACTICES_ENABLED" - ] - return dict(FEATURE_BEST_PRACTICES_ENABLED=feature_best_practices_enabled) - - @application.context_processor - def inject_feature_flags(): - feature_best_practices_enabled = application.config[ - "FEATURE_ABOUT_PAGE_ENABLED" - ] - return dict(FEATURE_ABOUT_PAGE_ENABLED=feature_best_practices_enabled) + feature_best_practices_enabled = application.config.get("FEATURE_BEST_PRACTICES_ENABLED", False) + feature_about_page_enabled = application.config.get("FEATURE_ABOUT_PAGE_ENABLED", False) + return dict( + FEATURE_BEST_PRACTICES_ENABLED=feature_best_practices_enabled, + FEATURE_ABOUT_PAGE_ENABLED=feature_about_page_enabled, + ) @application.context_processor def inject_initial_signin_url(): diff --git a/app/templates/components/header.html b/app/templates/components/header.html index 012b3b9c1..a1c1de389 100644 --- a/app/templates/components/header.html +++ b/app/templates/components/header.html @@ -56,7 +56,7 @@ secondary_navigation.is_selected('settings')}, {% endif %} - {% if not current_user.is_authenticated and FEATURE_ABOUT_PAGE_ENABLED %} + {% if not current_user.is_authenticated and FEATURE_ABOUT_PAGE_ENABLED and request.path == '/about'%}