2026-03-18 23:10:58 +01:00
|
|
|
import { useState } from 'react'
|
refactor: admin section UX/UI redesign
- Fix critical --bg-base token bug (dark mode broken), replace with --bg-surface
- Replace hand-rolled admin nav with Tabs composite (proper ARIA)
- Migrate AuditLog from custom table to DataTable with sorting, row accents, card wrapper
- Remove duplicate h2 page titles (breadcrumb + tab already identify the page)
- Rework user creation with provider-aware form (Local/OIDC RadioGroup)
- Add Security section with password reset for local users, OIDC info for external
- Add toast notifications to all RBAC mutations (create/delete/add/remove)
- Add confirmation dialogs for cascading removals (group/role)
- Add keyboard accessibility to entity lists (role/tabIndex/aria-selected)
- Add empty search states, duplicate name validation
- Replace lock emoji with Badge, fix radii/shadow/padding consistency
- Badge dashed variant keeps background color
- Inherited roles shown with dashed outline + reduced opacity
- Inline MultiSelect (+Add) for groups, roles, members, child groups
- Center OIDC form, replace inline styles with CSS modules
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:44:19 +01:00
|
|
|
import styles from './UserManagement.module.css'
|
2026-03-18 23:10:58 +01:00
|
|
|
import { AdminLayout } from '../Admin'
|
|
|
|
|
import { Tabs } from '../../../design-system/composites/Tabs/Tabs'
|
|
|
|
|
import { UsersTab } from './UsersTab'
|
|
|
|
|
import { GroupsTab } from './GroupsTab'
|
|
|
|
|
import { RolesTab } from './RolesTab'
|
|
|
|
|
|
|
|
|
|
const TABS = [
|
|
|
|
|
{ label: 'Users', value: 'users' },
|
|
|
|
|
{ label: 'Groups', value: 'groups' },
|
|
|
|
|
{ label: 'Roles', value: 'roles' },
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export function UserManagement() {
|
|
|
|
|
const [tab, setTab] = useState('users')
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<AdminLayout title="User Management">
|
|
|
|
|
<Tabs tabs={TABS} active={tab} onChange={setTab} />
|
refactor: admin section UX/UI redesign
- Fix critical --bg-base token bug (dark mode broken), replace with --bg-surface
- Replace hand-rolled admin nav with Tabs composite (proper ARIA)
- Migrate AuditLog from custom table to DataTable with sorting, row accents, card wrapper
- Remove duplicate h2 page titles (breadcrumb + tab already identify the page)
- Rework user creation with provider-aware form (Local/OIDC RadioGroup)
- Add Security section with password reset for local users, OIDC info for external
- Add toast notifications to all RBAC mutations (create/delete/add/remove)
- Add confirmation dialogs for cascading removals (group/role)
- Add keyboard accessibility to entity lists (role/tabIndex/aria-selected)
- Add empty search states, duplicate name validation
- Replace lock emoji with Badge, fix radii/shadow/padding consistency
- Badge dashed variant keeps background color
- Inherited roles shown with dashed outline + reduced opacity
- Inline MultiSelect (+Add) for groups, roles, members, child groups
- Center OIDC form, replace inline styles with CSS modules
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:44:19 +01:00
|
|
|
<div className={styles.tabContent}>
|
2026-03-18 23:10:58 +01:00
|
|
|
{tab === 'users' && <UsersTab />}
|
|
|
|
|
{tab === 'groups' && <GroupsTab />}
|
|
|
|
|
{tab === 'roles' && <RolesTab />}
|
|
|
|
|
</div>
|
|
|
|
|
</AdminLayout>
|
|
|
|
|
)
|
|
|
|
|
}
|