All checks were successful
Deploy Development / deploy (push) Successful in 37s
Test Suite / pytest-backend (push) Successful in 25s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 8s
Test Suite / playwright-tests (push) Successful in 23s
Test Suite / pytest-backend (pull_request) Successful in 24s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 7s
Test Suite / playwright-tests (pull_request) Successful in 24s
- Updated access control to ensure only superadmins can view admin routes and manage users. - Refactored navigation components to reflect the new role-based access, removing platform admin references. - Enhanced the admin user management page to streamline functionality for superadmins, including password reset options. - Improved overall user experience by clarifying navigation paths and access permissions for different user roles.
9 lines
287 B
JavaScript
9 lines
287 B
JavaScript
import { Navigate } from 'react-router-dom'
|
|
import { useAuth } from '../context/AuthContext'
|
|
|
|
export default function AdminHomeRedirect() {
|
|
const { user } = useAuth()
|
|
const isSuper = user?.role === 'superadmin'
|
|
return <Navigate to={isSuper ? '/admin/hierarchy' : '/'} replace />
|
|
}
|