mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Added back removed code
This commit is contained in:
@@ -18,13 +18,18 @@ from app.main.views.sub_navigation_dictionaries import (
|
|||||||
from app.utils.user import user_is_logged_in
|
from app.utils.user import user_is_logged_in
|
||||||
from notifications_utils.url_safe_token import generate_token
|
from notifications_utils.url_safe_token import generate_token
|
||||||
|
|
||||||
|
|
||||||
# Hook to check for feature flags
|
# Hook to check for feature flags
|
||||||
@main.before_request
|
@main.before_request
|
||||||
def check_guidance_feature():
|
def check_feature_flags():
|
||||||
if (
|
if (
|
||||||
request.path.startswith("/guides/best-practices")
|
request.path.startswith("/best-practices")
|
||||||
and not current_app.config["FEATURE_BEST_PRACTICES_ENABLED"]
|
and not current_app.config.get("FEATURE_BEST_PRACTICES_ENABLED", False)
|
||||||
|
):
|
||||||
|
abort(404)
|
||||||
|
|
||||||
|
if (
|
||||||
|
request.path.startswith("/about")
|
||||||
|
and not current_app.config.get("FEATURE_ABOUT_PAGE_ENABLED", False)
|
||||||
):
|
):
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user