Minimal RBAC + Feature Flags + Developer Mode
- 4 roles: SuperAdmin, Operator, Reviewer, PilotUser - Capabilities (not pages): mission.create, artifact.view, decision.approve, etc. - Feature flags: ENABLE_REPLAY, ENABLE_MODEL_TRAINING, etc. - Developer Mode toggle in UI (activated by permission) - New rule: All features must link to module, capability, and role Next: Deploy pilot environment
This commit is contained in:
+25
-1
@@ -1,4 +1,5 @@
|
||||
import { Routes, Route, Link } from 'react-router-dom';
|
||||
import { useState } from 'react';
|
||||
import DatasetExplorer from './pages/DatasetExplorer';
|
||||
import ArtifactViewer from './pages/ArtifactViewer';
|
||||
import MissionUpload from './pages/MissionUpload';
|
||||
@@ -8,10 +9,26 @@ import PilotChecklist from './pages/PilotChecklist';
|
||||
import ReadinessDashboard from './pages/ReadinessDashboard';
|
||||
|
||||
function App() {
|
||||
const [developerMode, setDeveloperMode] = useState(false);
|
||||
|
||||
return (
|
||||
<div style={{ fontFamily: 'system-ui, sans-serif', maxWidth: 1200, margin: '0 auto', padding: 20 }}>
|
||||
<header style={{ borderBottom: '2px solid #333', paddingBottom: 20, marginBottom: 20 }}>
|
||||
<h1>LandveX Intelligence Lab</h1>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<h1>LandveX {developerMode ? '(Developer Mode)' : ''}</h1>
|
||||
<button
|
||||
onClick={() => setDeveloperMode(!developerMode)}
|
||||
style={{
|
||||
padding: '8px 16px',
|
||||
background: developerMode ? '#ffd700' : '#f0f0f0',
|
||||
border: '1px solid #ccc',
|
||||
borderRadius: 4,
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
>
|
||||
{developerMode ? '🔓 Developer' : '🔒 Normal'}
|
||||
</button>
|
||||
</div>
|
||||
<nav style={{ display: 'flex', gap: 20, marginTop: 10 }}>
|
||||
<Link to="/">Dataset Explorer</Link>
|
||||
<Link to="/upload">Mission Upload</Link>
|
||||
@@ -19,6 +36,13 @@ function App() {
|
||||
<Link to="/health">Health</Link>
|
||||
<Link to="/pilot">Pilot 001</Link>
|
||||
<Link to="/readiness">Readiness</Link>
|
||||
{developerMode && (
|
||||
<>
|
||||
<Link to="/datasets">Datasets</Link>
|
||||
<Link to="/models">Models</Link>
|
||||
<Link to="/training">Training</Link>
|
||||
</>
|
||||
)}
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user