diff --git a/package.json b/package.json index 1023d63..2c37f05 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "smartims", "private": true, - "version": "0.3.1", + "version": "0.3.2", "type": "module", "scripts": { "dev": "vite", diff --git a/server/package.json b/server/package.json index 2902cf4..b794fd6 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "server", - "version": "0.3.1", + "version": "0.3.2", "description": "", "main": "index.js", "scripts": { diff --git a/src/modules/asset/components/AssetBasicInfo.tsx b/src/modules/asset/components/AssetBasicInfo.tsx index 1da4646..c7b06ca 100644 --- a/src/modules/asset/components/AssetBasicInfo.tsx +++ b/src/modules/asset/components/AssetBasicInfo.tsx @@ -7,6 +7,7 @@ import { assetApi } from '../../../shared/api/assetApi'; import type { Asset } from '../../../shared/api/assetApi'; import { SERVER_URL } from '../../../shared/api/client'; import { createPortal } from 'react-dom'; +import { useAuth } from '../../../shared/auth/AuthContext'; interface AssetBasicInfoProps { asset: Asset & { image?: string, consumables?: any[] }; @@ -14,6 +15,8 @@ interface AssetBasicInfoProps { } export function AssetBasicInfo({ asset, onRefresh }: AssetBasicInfoProps) { + const { user } = useAuth(); + const isAdmin = user?.role === 'admin' || user?.role === 'supervisor'; const [isEditing, setIsEditing] = useState(false); const [editData, setEditData] = useState(asset); const [isZoomed, setIsZoomed] = useState(false); @@ -69,7 +72,7 @@ export function AssetBasicInfo({ asset, onRefresh }: AssetBasicInfoProps) { ) : ( - + isAdmin && )} @@ -341,7 +344,7 @@ export function AssetBasicInfo({ asset, onRefresh }: AssetBasicInfoProps) {

관련 소모품 관리

- + {isAdmin && }
diff --git a/src/modules/asset/module.tsx b/src/modules/asset/module.tsx index f94431c..2832ced 100644 --- a/src/modules/asset/module.tsx +++ b/src/modules/asset/module.tsx @@ -22,5 +22,5 @@ export const assetModule: IModuleDefinition = { { path: '/instruments', element: , label: '계측기 관리', position: 'top' }, { path: '/vehicles', element: , label: '차량 관리', position: 'top' }, ], - requiredRoles: ['admin', 'manager'] + requiredRoles: ['admin', 'manager', 'user'] }; diff --git a/src/modules/asset/pages/AssetListPage.tsx b/src/modules/asset/pages/AssetListPage.tsx index b0fea06..3ec0e8b 100644 --- a/src/modules/asset/pages/AssetListPage.tsx +++ b/src/modules/asset/pages/AssetListPage.tsx @@ -4,6 +4,7 @@ import { Card } from '../../../shared/ui/Card'; import { Button } from '../../../shared/ui/Button'; import { Input } from '../../../shared/ui/Input'; import { Search, Plus, Filter, Download, ChevronsLeft, ChevronsRight, ChevronLeft, ChevronRight } from 'lucide-react'; +import { useAuth } from '../../../shared/auth/AuthContext'; import './AssetListPage.css'; import { getCategories } from './AssetSettingsPage'; @@ -19,6 +20,8 @@ import { saveAs } from 'file-saver'; export function AssetListPage() { const location = useLocation(); const navigate = useNavigate(); + const { user } = useAuth(); + const isAdmin = user?.role === 'admin' || user?.role === 'supervisor'; const [searchTerm, setSearchTerm] = useState(''); const [currentPage, setCurrentPage] = useState(1); const [assets, setAssets] = useState([]); @@ -277,7 +280,9 @@ export function AssetListPage() { 필터 - + {isAdmin && ( + + )} {/* Filter Popup */} {isFilterOpen && ( diff --git a/src/modules/cctv/module.tsx b/src/modules/cctv/module.tsx index 2c92cb2..8a768f5 100644 --- a/src/modules/cctv/module.tsx +++ b/src/modules/cctv/module.tsx @@ -7,5 +7,5 @@ export const cctvModule: IModuleDefinition = { routes: [ { path: '/live', element: , label: '실시간 관제' }, ], - requiredRoles: ['admin', 'operator'] + requiredRoles: ['admin', 'operator', 'user'] }; diff --git a/src/modules/production/module.tsx b/src/modules/production/module.tsx index c96c7e5..a3724c0 100644 --- a/src/modules/production/module.tsx +++ b/src/modules/production/module.tsx @@ -7,5 +7,5 @@ export const productionModule: IModuleDefinition = { routes: [ { path: '/dashboard', element: , label: '생산 현황' }, ], - requiredRoles: ['admin', 'manager'] + requiredRoles: ['admin', 'manager', 'user'] }; diff --git a/src/platform/pages/VersionPage.tsx b/src/platform/pages/VersionPage.tsx index 9626dbb..efb89ed 100644 --- a/src/platform/pages/VersionPage.tsx +++ b/src/platform/pages/VersionPage.tsx @@ -97,7 +97,7 @@ export function VersionPage() { }; // Client/Frontend version fixed at build time - const frontendVersion = '0.3.1'; + const frontendVersion = '0.3.2'; const buildDate = '2026-01-24'; // Check if update is needed based on frontend version vs remote tag @@ -249,6 +249,17 @@ export function VersionPage() {
{[ + { + version: '0.3.2', + date: '2026-01-24', + title: '일반 사용자(User) 권한 가시성 패치', + changes: [ + '일반 사용자 계정 접속 시 사이드바 메뉴가 보이지 않던 권한 필터 오류 수정', + '자산 관리 상세 정보에서 일반 사용자의 수정/삭제 버튼 노출 제한 (View-only)', + 'CCTV 모듈 내 일반 사용자의 제어 권한 제한 재검토' + ], + type: 'fix' + }, { version: '0.3.1', date: '2026-01-24',