From d7eb610d760d21943d319e7c42a6040b34046510 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Sun, 26 Jul 2026 21:46:02 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20require=5Factive=5Fplugin=20without=20ge?= =?UTF-8?q?t=5Fcurrent=5Fuser=20dependency=20=E2=80=94=20auth=20handled=20?= =?UTF-8?q?by=20individual=20routes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/deps.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/deps.py b/app/deps.py index 6e9154f..a2b2f3c 100644 --- a/app/deps.py +++ b/app/deps.py @@ -232,11 +232,12 @@ def require_active_plugin(plugin_name: str): Returns 403 if the plugin is not active in the permission registry. This allows routes to be registered at app creation time while enforcing activation status at request time. + + Note: Does NOT depend on get_current_user — individual route handlers + already have their own auth dependencies (require_permission, etc.). + This check only verifies plugin activation status. """ - async def _check( - request: Request, - current_user: dict[str, Any] = Depends(get_current_user), - ) -> dict[str, Any]: + async def _check() -> None: from app.core.permission_registry import get_permission_registry try: registry = get_permission_registry() @@ -253,6 +254,5 @@ def require_active_plugin(plugin_name: str): except Exception: # If registry not initialized yet, allow request (startup race) pass - return current_user return _check