From 3bec320bb9b093e7aa81ccb67feda433db2d99f9 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 23 Jan 2026 01:23:34 +0400 Subject: [PATCH] refac --- backend/open_webui/routers/channels.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/channels.py b/backend/open_webui/routers/channels.py index 0e2ac1ecc1..e463276589 100644 --- a/backend/open_webui/routers/channels.py +++ b/backend/open_webui/routers/channels.py @@ -81,14 +81,14 @@ router = APIRouter() ############################ -def check_channels_access(request: Request, user=Optional[UserModel] = None): +def check_channels_access(request: Request, user: Optional[UserModel] = None): """Dependency to ensure channels are globally enabled.""" if not request.app.state.config.ENABLE_CHANNELS: raise HTTPException( status_code=status.HTTP_403_FORBIDDEN, detail="Channels are not enabled", ) - + if user: if user.role != "admin" and not has_permission( user.id, "features.channels", request.app.state.config.USER_PERMISSIONS