feat: Implement user and policy management UI

- Add comprehensive user management with CRUD operations
- Implement policy management with templates and custom JSON
- Create reusable components (ConfirmDialog, LoadingState, EmptyState)
- Add user creation with password validation and credential copying
- Implement policy creation with built-in templates
- Add policy attachment to users functionality
- Include search, filtering, and status management
- Add proper error handling and validation
- Implement Material-UI based responsive design

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-23 16:45:39 +02:00
parent a91d56751c
commit 55983d0088
13 changed files with 1818 additions and 16 deletions
+25
View File
@@ -0,0 +1,25 @@
export const getAuthHeaders = (): Record<string, string> => {
const token = localStorage.getItem('authToken');
if (!token) {
return {};
}
return {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
};
};
export const isAuthenticated = (): boolean => {
const token = localStorage.getItem('authToken');
return !!token;
};
export const setAuthToken = (token: string): void => {
localStorage.setItem('authToken', token);
};
export const clearAuthToken = (): void => {
localStorage.removeItem('authToken');
};