diff --git a/backend/open_webui/routers/users.py b/backend/open_webui/routers/users.py index 83eb25312a..c98eb2d6da 100644 --- a/backend/open_webui/routers/users.py +++ b/backend/open_webui/routers/users.py @@ -324,6 +324,14 @@ async def update_user_settings_by_session_user( user=Depends(get_verified_user), db: AsyncSession = Depends(get_async_session), ): + if user.role != 'admin' and not await has_permission( + user.id, 'settings.interface', request.app.state.config.USER_PERMISSIONS + ): + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail=ERROR_MESSAGES.ACCESS_PROHIBITED, + ) + updated_user_settings = form_data.model_dump() ui_settings = updated_user_settings.get('ui') if (