LibreChat/client/src
Danny Avila d350c58633
🚫 fix: Hide Delete Account Button When ALLOW_ACCOUNT_DELETION Is Disabled (#12568)
* fix: hide Delete Account button when ALLOW_ACCOUNT_DELETION is false

* fix: add admin bypass, inline env read, and tests for allowAccountDeletion

- Show delete button for admin users even when ALLOW_ACCOUNT_DELETION=false,
  matching the canDeleteAccount middleware's ACCESS_ADMIN bypass
- Move env var read inline in buildSharedPayload() for per-request evaluation
- Add 4 frontend tests for Account conditional rendering
- Add 3 backend tests for allowAccountDeletion config field

* fix: use server-side ACCESS_ADMIN capability check instead of frontend role check

- Replace frontend SystemRoles.ADMIN check with server-side hasCapability()
  in the authenticated config route, matching canDeleteAccount middleware exactly
- Admin bypass now evaluates ACCESS_ADMIN capability per-user in GET /api/config,
  so users with the grant (regardless of role) see the button, and admins
  without the grant do not
- Add 3 authenticated backend tests: without capability, with capability,
  and skip-when-already-enabled
- Simplify frontend to pure config check (no role logic)
- Remove redundant jest-dom import; add inline env var comment

* test: add missing toHaveBeenCalled assertion in ACCESS_ADMIN test
2026-04-07 23:51:23 -04:00
..
@types 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
a11y ⚗️ feat: Agent Context Compaction/Summarization (#12287) 2026-03-21 14:28:56 -04:00
common 🪢 refactor: Eliminate Unnecessary Re-renders During Message Streaming (#12454) 2026-03-29 17:05:12 -04:00
components 🚫 fix: Hide Delete Account Button When ALLOW_ACCOUNT_DELETION Is Disabled (#12568) 2026-04-07 23:51:23 -04:00
constants 🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804) 2025-08-13 16:24:17 -04:00
data-provider 🔨 fix: Custom Role Permissions (#12528) 2026-04-03 13:24:11 -04:00
hooks 📝 fix: Properly Restore Draft Text When Switching Conversations (#12384) 2026-04-03 14:08:21 -04:00
locales 🌍 i18n: Update translation.json with latest translations (#12458) 2026-03-29 18:43:43 -04:00
Providers 🪝 fix: Safe Hook Fallbacks for Tool-Call Components in Search Route (#12423) 2026-03-26 16:40:37 -04:00
routes 📁 refactor: Prompts UI (#11570) 2026-03-22 16:56:22 -04:00
store 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
utils 🏖️ fix: Sandpack ExternalResources for Static HTML Artifact Previews (#12509) 2026-04-01 22:06:42 -04:00
App.jsx 🛜 feat: Enable Network Requests in Offline Mode (#11107) 2025-12-26 09:01:27 -05:00
main.jsx 🎨 feat: add copy-tex to improve copying KaTeX (#7308) 2025-05-15 12:08:47 -04:00
mobile.css 🎨 refactor: Redesign Sidebar with Unified Icon Strip Layout (#12013) 2026-03-22 01:15:20 -04:00
style.css 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
vite-env.d.ts