Fix all 7 launch blockers from security/QA review
SEC-16: Add frontend ports mapping (80:80) to docker-compose.yml UI-01: Add routes for Welcome, SettingsIntegrations, MealPlan in App.jsx SEC-01: Remove traceback leak from auth error responses SEC-02: Fix require_admin to use is_admin column (was undefined ADMIN_USERNAME) SEC-03: Add API_TOKEN auth for MCP connector -> backend communication SEC-04: OAuth state now uses signed JWT tokens (was raw user UUID) OS-01: First registered user gets admin immediately during registration 10 files changed, 97 insertions(+), 25 deletions(-)
This commit is contained in:
parent
50eae17c34
commit
69320e1e82
10 changed files with 97 additions and 25 deletions
|
|
@ -31,10 +31,9 @@ function HelpButton() {
|
|||
|
||||
// Don't show on login/onboarding/support pages
|
||||
const hidden = ['/login', '/onboarding', '/support'].some(p => location.pathname.startsWith(p))
|
||||
if (hidden) return null
|
||||
|
||||
useEffect(() => {
|
||||
if (!hasToken()) return
|
||||
if (hidden || !hasToken()) return
|
||||
api.getUnreadCount()
|
||||
.then(d => setUnread(d.unread || 0))
|
||||
.catch(() => {})
|
||||
|
|
@ -45,7 +44,9 @@ function HelpButton() {
|
|||
.catch(() => {})
|
||||
}, 60000)
|
||||
return () => clearInterval(interval)
|
||||
}, [location.pathname])
|
||||
}, [location.pathname, hidden])
|
||||
|
||||
if (hidden) return null
|
||||
|
||||
return (
|
||||
<button
|
||||
|
|
@ -117,6 +118,9 @@ export default function App() {
|
|||
<Route path="/support" element={<ProtectedRoute><Support /></ProtectedRoute>} />
|
||||
<Route path="/support/admin" element={<ProtectedRoute><SupportAdmin /></ProtectedRoute>} />
|
||||
<Route path="/support/admin/:threadId" element={<ProtectedRoute><SupportAdmin /></ProtectedRoute>} />
|
||||
<Route path="/welcome" element={<Welcome />} />
|
||||
<Route path="/settings/integrations" element={<ProtectedRoute><SettingsIntegrations /></ProtectedRoute>} />
|
||||
<Route path="/meal-plan" element={<ProtectedRoute><MealPlan /></ProtectedRoute>} />
|
||||
</Routes>
|
||||
{hasToken() && <NavBar />}
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue