ulysses/core
Lucas Daniel 5462030cde
fix(auth): per-user allowed-models checklist ignores cache, [None] doesn't block (#3355)
Three issues combined to make the per-user 'Allowed models' checklist
unreliable (#3032):

1. admin.js _loadModelsForUser fetched /api/models, which is backed by
   cached_models — endpoints that haven't been probed yet (e.g. a
   freshly-added DeepSeek API endpoint) simply didn't show up in the
   checklist. Switched to /api/model-endpoints, which always reflects
   every configured endpoint regardless of cache state.

2. _saveModels sent allowed_models: [] both when the admin clicked
   [All] (no restriction) and [None] (block everything) — the backend
   had no way to distinguish the two.

3. _enforce_chat_privileges treated an empty allowed_models list as
   'no restriction' (falsy -> skip the check), so [None] had no effect.

Added an explicit block_all_models privilege flag (defaulting to False,
and forced to False for admins) that admin.js now sets when zero models
are checked. _enforce_chat_privileges checks it first and 403s
regardless of allowed_models contents.
2026-06-08 22:52:39 +02:00
..
__init__.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
atomic_io.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
auth.py fix(auth): per-user allowed-models checklist ignores cache, [None] doesn't block (#3355) 2026-06-08 22:52:39 +02:00
constants.py refactor(constants): single source of truth for data dir (#3368) 2026-06-08 09:58:52 +02:00
database.py feat: add ChatGPT Subscription provider (#2876) 2026-06-08 10:19:18 +02:00
exceptions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
middleware.py fix(documents): restore PDF library metadata and preview (#2483) 2026-06-07 23:23:27 +02:00
models.py fix: exclude slash-command/setup messages from LLM context (#2634) (#2640) 2026-06-04 21:42:23 +02:00
platform_compat.py fix(platform): Improve WSL SSH remote compatibility (#3316) 2026-06-08 00:33:50 +02:00
session_manager.py Fix session cleanup cutoff timezone (#2488) 2026-06-05 09:52:34 +02:00