mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
remove unneded mfa_enabled
This commit is contained in:
@ -30,10 +30,9 @@ import type { AuthConfig, Provider } from '../../../../states/states';
|
|||||||
import { useReauth } from './useConfirm';
|
import { useReauth } from './useConfirm';
|
||||||
|
|
||||||
export function SecurityContent() {
|
export function SecurityContent() {
|
||||||
const [auth_config, sso_enabled, mfa_enabled] = useServerApiState((state) => [
|
const [auth_config, sso_enabled] = useServerApiState((state) => [
|
||||||
state.auth_config,
|
state.auth_config,
|
||||||
state.sso_enabled,
|
state.sso_enabled
|
||||||
state.mfa_enabled
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -59,19 +58,7 @@ export function SecurityContent() {
|
|||||||
<Title order={5}>
|
<Title order={5}>
|
||||||
<Trans>Multifactor authentication</Trans>
|
<Trans>Multifactor authentication</Trans>
|
||||||
</Title>
|
</Title>
|
||||||
{mfa_enabled() ? (
|
<MfaSection />
|
||||||
<MfaSection />
|
|
||||||
) : (
|
|
||||||
<Alert
|
|
||||||
icon={<IconAlertCircle size='1rem' />}
|
|
||||||
title={t`Not enabled`}
|
|
||||||
color='yellow'
|
|
||||||
>
|
|
||||||
<Trans>
|
|
||||||
Multifactor authentication is not enabled for this server
|
|
||||||
</Trans>
|
|
||||||
</Alert>
|
|
||||||
)}
|
|
||||||
<Title order={5}>
|
<Title order={5}>
|
||||||
<Trans>Access Tokens</Trans>
|
<Trans>Access Tokens</Trans>
|
||||||
</Title>
|
</Title>
|
||||||
|
@ -12,7 +12,6 @@ interface ServerApiStateProps {
|
|||||||
fetchServerApiState: () => void;
|
fetchServerApiState: () => void;
|
||||||
auth_config?: AuthConfig;
|
auth_config?: AuthConfig;
|
||||||
sso_enabled: () => boolean;
|
sso_enabled: () => boolean;
|
||||||
mfa_enabled: () => boolean;
|
|
||||||
registration_enabled: () => boolean;
|
registration_enabled: () => boolean;
|
||||||
sso_registration_enabled: () => boolean;
|
sso_registration_enabled: () => boolean;
|
||||||
password_forgotten_enabled: () => boolean;
|
password_forgotten_enabled: () => boolean;
|
||||||
@ -52,10 +51,6 @@ export const useServerApiState = create<ServerApiStateProps>()(
|
|||||||
const data = get().auth_config?.socialaccount.providers;
|
const data = get().auth_config?.socialaccount.providers;
|
||||||
return !(data === undefined || data.length == 0);
|
return !(data === undefined || data.length == 0);
|
||||||
},
|
},
|
||||||
mfa_enabled: () => {
|
|
||||||
// TODO
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
registration_enabled: () => {
|
registration_enabled: () => {
|
||||||
// TODO
|
// TODO
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user