Can disable auth

This commit is contained in:
2023-09-08 09:04:48 +02:00
parent 57c023b45b
commit bd5ea1fb23
6 changed files with 15 additions and 3 deletions

View File

@ -13,6 +13,7 @@ import { BaseAuthenticatedPage } from "./widgets/BaseAuthenticatedPage";
import { LoginRoute } from "./routes/auth/LoginRoute";
import { AuthApi } from "./api/AuthApi";
import { IsoFilesRoute } from "./routes/IsoFilesRoute";
import { ServerApi } from "./api/ServerApi";
interface AuthContext {
signedIn: boolean;
@ -31,7 +32,7 @@ export function App() {
const router = createBrowserRouter(
createRoutesFromElements(
signedIn ? (
signedIn || ServerApi.Config.auth_disabled ? (
<Route path="*" element={<BaseAuthenticatedPage />}>
<Route path="iso" element={<IsoFilesRoute />} />
<Route path="*" element={<NotFoundRoute />} />

View File

@ -1,6 +1,7 @@
import { APIClient } from "./ApiClient";
export interface ServerConfig {
auth_disabled: boolean;
local_auth_enabled: boolean;
oidc_auth_enabled: boolean;
iso_mimetypes: string[];