"use client" import { OrgSettingsSection } from "@/components/admin/settings/org-settings-form" import { DeployLockedHint, useDeployFieldLocked } from "@/components/admin/settings/deploy-locked-hint" import { useOrgSettingsStore } from "@/lib/admin-settings/org-settings-store" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Switch } from "@/components/ui/switch" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" export function AuthenticationSection() { const authentik = useOrgSettingsStore((s) => s.authentik) const setAuthentik = useOrgSettingsStore((s) => s.setAuthentik) const effective = useOrgSettingsStore((s) => s.meta?.effective.authentik) const enabledLocked = useDeployFieldLocked("authentik", "enabled") const apiLocked = useDeployFieldLocked("authentik", "api_url") const clientLocked = useDeployFieldLocked("authentik", "client_id") const enabled = enabledLocked ? (effective?.enabled ?? authentik.enabled) : authentik.enabled const apiURL = apiLocked ? (effective?.api_url ?? authentik.api_url) : authentik.api_url const clientID = clientLocked ? (effective?.client_id ?? authentik.client_id) : authentik.client_id return (
Authentik activé Connexion via le fournisseur d'identité organisationnel. {enabledLocked ? : null}
setAuthentik({ enabled: v })} />
setAuthentik({ api_url: e.target.value })} placeholder="https://auth.example.com/api/v3" />
setAuthentik({ slug: e.target.value })} />
setAuthentik({ client_id: e.target.value })} />
setAuthentik({ default_groups: e.target.value })} />
) }