Add user editing functionality to admin panel with improved UI and self-protection safeguards

Implemented comprehensive user editing in admin dashboard with PATCH endpoint for updating email, display name, role, password, and disabled status. Added validation to prevent admins from demoting or disabling themselves, and duplicate email detection. Refactored AdminPanel to modal-based editor with separate create/edit modes, form state management, and save/cancel actions. Enhanced UI with field labels, checkbox for account status, action
This commit is contained in:
2026-08-02 10:11:38 +02:00
parent 630a816df0
commit a532cae9bd
6 changed files with 172 additions and 183 deletions
+7
View File
@@ -180,6 +180,13 @@ export const styles = {
fontWeight: 1000,
color: stylesTokens.textGold,
},
adminFieldLabel: {
display: "grid",
gap: 5,
color: stylesTokens.textDim,
fontSize: 12,
fontWeight: 800,
},
userRow: {
display: "grid",
gridTemplateColumns: "1fr 80px 90px",