LibreChat/packages
Dustin Healy b9f08e5696 fix: stale cache on rename, extract renameRole helper, shared pagination, cleanup
- Fix updateRoleByName cache bug: invalidate old key and populate new key
  when updates.name differs from roleName (prevents stale cache after rename)
- Extract renameRole helper to eliminate mutable outer-scope state flags
  (isRename, trimmedName, migrationRan) in updateRoleHandler
- Unify system-role protection to 403 for both rename-from and rename-to
- Extract parsePagination to shared admin/pagination.ts; use in both
  roles.ts and groups.ts
- Extract name.trim() to local const in createRoleByName (was called 5×)
- Remove redundant findOne pre-check in deleteRoleByName
- Replace getUserModel closure with local const declarations
- Remove redundant description ?? '' in createRoleHandler (schema default)
- Add doc comment on updateRolePermissionsHandler noting cache dependency
- Add data-layer tests for cache rename behavior (old key null, new key set)
2026-03-27 07:46:59 -07:00
..
api fix: stale cache on rename, extract renameRole helper, shared pagination, cleanup 2026-03-27 07:46:59 -07:00
client 📁 refactor: Prompts UI (#11570) 2026-03-22 16:56:22 -04:00
data-provider 🎛️ feat: DB-Backed Per-Principal Config System (#12354) 2026-03-25 19:39:29 -04:00
data-schemas fix: stale cache on rename, extract renameRole helper, shared pagination, cleanup 2026-03-27 07:46:59 -07:00