Can disable auth
This commit is contained in:
@ -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 />} />
|
||||
|
@ -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[];
|
||||
|
Reference in New Issue
Block a user