2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 20:15:44 +00:00

remove unneded mfa_enabled

This commit is contained in:
Matthias Mair
2025-01-13 08:25:21 +01:00
parent 5a07f48c14
commit d2c9519a68
2 changed files with 3 additions and 21 deletions

View File

@ -30,10 +30,9 @@ import type { AuthConfig, Provider } from '../../../../states/states';
import { useReauth } from './useConfirm';
export function SecurityContent() {
const [auth_config, sso_enabled, mfa_enabled] = useServerApiState((state) => [
const [auth_config, sso_enabled] = useServerApiState((state) => [
state.auth_config,
state.sso_enabled,
state.mfa_enabled
state.sso_enabled
]);
return (
@ -59,19 +58,7 @@ export function SecurityContent() {
<Title order={5}>
<Trans>Multifactor authentication</Trans>
</Title>
{mfa_enabled() ? (
<MfaSection />
) : (
<Alert
icon={<IconAlertCircle size='1rem' />}
title={t`Not enabled`}
color='yellow'
>
<Trans>
Multifactor authentication is not enabled for this server
</Trans>
</Alert>
)}
<MfaSection />
<Title order={5}>
<Trans>Access Tokens</Trans>
</Title>

View File

@ -12,7 +12,6 @@ interface ServerApiStateProps {
fetchServerApiState: () => void;
auth_config?: AuthConfig;
sso_enabled: () => boolean;
mfa_enabled: () => boolean;
registration_enabled: () => boolean;
sso_registration_enabled: () => boolean;
password_forgotten_enabled: () => boolean;
@ -52,10 +51,6 @@ export const useServerApiState = create<ServerApiStateProps>()(
const data = get().auth_config?.socialaccount.providers;
return !(data === undefined || data.length == 0);
},
mfa_enabled: () => {
// TODO
return true;
},
registration_enabled: () => {
// TODO
return false;