[feat] negodata: 회원관리 / 최고관리자(OWNER)
- OWNER 권한 신설, 최고관리자가 자기 회사 소속 직원(USER) 계정 생성·수정·삭제 관리 - 회사 사용자 API(/v1/company/user/*), 회원관리 페이지·폼 - 로그인/프로필 흐름 정비, 무인증 계정생성(/auth/create) 제거 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
7da1925365
commit
a40257ddc1
45 files changed
+1928
-150
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import {createBrowserRouter, redirect} from 'react-router';
|
||||
import {initAuth} from '../features/auth/service';
|
||||
import {isLoggedIn} from '../stores/auth';
|
||||
import {isLoggedIn, hasRole} from '../stores/auth';
|
||||
import AuthenticatedLayout from '@/components/layout/AuthenticatedLayout';
|
||||
import LoginPage from '../pages/login';
|
||||
import ForbiddenPage from '../pages/forbidden';
|
||||
@@ -9,6 +9,7 @@ import ProductsPage from '../pages/products';
|
||||
import PartnersPage from '../pages/partners';
|
||||
import QuotationPage from '../pages/quotation';
|
||||
import CardsPage from '../pages/cards';
|
||||
import MembersPage from '../pages/members';
|
||||
|
||||
export const router = createBrowserRouter([
|
||||
// dev 전용: import.meta.env.DEV가 false인 프로덕션 빌드에선 이 배열 항목과
|
||||
@@ -56,6 +57,12 @@ export const router = createBrowserRouter([
|
||||
{path: 'partners', Component: PartnersPage},
|
||||
{path: 'quotation', Component: QuotationPage},
|
||||
{path: 'cards', Component: CardsPage},
|
||||
{
|
||||
// 최고관리자 전용. 부모 loader 가 initAuth 를 마친 뒤 실행되므로 유저 상태가 복원돼 있다.
|
||||
path: 'members',
|
||||
loader: () => (hasRole('최고관리자') ? null : redirect('/forbidden')),
|
||||
Component: MembersPage,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user