mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
added feature flag
This commit is contained in:
@@ -25,15 +25,17 @@ from app.utils.user import user_is_logged_in
|
||||
def check_feature_flags():
|
||||
# Placeholder for future feature flag checks
|
||||
# Example:
|
||||
# if request.path.startswith("/some-feature") and not current_app.config.get("FEATURE_SOME_FEATURE_ENABLED", False):
|
||||
# abort(404)
|
||||
if request.path.startswith("/jobs") and not current_app.config.get(
|
||||
"FEATURE_SOCKET_ENABLED", False
|
||||
):
|
||||
abort(404)
|
||||
pass
|
||||
|
||||
|
||||
@main.route("/test/feature-flags")
|
||||
def test_feature_flags():
|
||||
return jsonify(
|
||||
{"FEATURE_ABOUT_PAGE_ENABLED": current_app.config["FEATURE_ABOUT_PAGE_ENABLED"]}
|
||||
{"FEATURE_SOCKET_ENABLED": current_app.config["FEATURE_SOCKET_ENABLED"]}
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user