From 7f6c39dc803bcfbb2e882e8b0e6d31fc12b15c17 Mon Sep 17 00:00:00 2001 From: "F.N. Claessen" Date: Wed, 13 May 2026 10:20:24 +0200 Subject: [PATCH 1/2] fix: make `running_as_cli` also pick up on running CLI commands using `flask` instead of `flexmeasures` Signed-off-by: F.N. Claessen --- flexmeasures/cli/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flexmeasures/cli/__init__.py b/flexmeasures/cli/__init__.py index 09c246f81e..9d17ef3d33 100644 --- a/flexmeasures/cli/__init__.py +++ b/flexmeasures/cli/__init__.py @@ -37,7 +37,10 @@ def is_running() -> bool: cli_sets = current_app.cli.list_commands(ctx=None) command_line = " ".join(sys.argv) for cli_set in cli_sets: - if f"flexmeasures {cli_set}" in command_line: + if ( + f"flexmeasures {cli_set}" in command_line + or f"flask {cli_set}" in command_line + ): return True if current_app.config.get("PRETEND_RUNNING_AS_CLI", False): return True From 4bc8ada327f574786aa76febf9909fb3e7ee67d6 Mon Sep 17 00:00:00 2001 From: "F.N. Claessen" Date: Wed, 13 May 2026 10:23:19 +0200 Subject: [PATCH 2/2] docs: changelog entry Signed-off-by: F.N. Claessen --- documentation/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/changelog.rst b/documentation/changelog.rst index 5ba2163859..977ae9fa7b 100644 --- a/documentation/changelog.rst +++ b/documentation/changelog.rst @@ -29,6 +29,7 @@ Bugfixes * Fix forecasting regressor filtering to use only regressor beliefs known at the forecast ``belief_time`` [see `PR #2134 `_] * Check read permissions for sensors referenced in forecasting and scheduling config payloads, and return a clearer 403 error when a referenced sensor is not readable [see `PR #2096 `_ and `PR #2125 `_] * Standardize resolution formatting across API endpoints for consistent response payloads [see `PR #2152 `_] +* Make the auth check for CLI commands work with ``flask``, too, instead of only with the ``flexmeasures`` alias [see `PR #2169 `_] v0.32.2 | May 12, 2026