2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-18 10:46:31 +00:00

feat(backend): improve comms around registration (#9932)

* use better email check

* add error code for missing email settings

* Add note when not registration is enabled

* fix wrong call

* fix tests - might be worth checking if the blank check for testing is a good idea

* capture issues and print to find out what the duck is going on

* exend log

* fix context check
This commit is contained in:
Matthias Mair
2025-07-13 01:20:45 +02:00
committed by GitHub
parent a2e06d1fee
commit b351fb7483
6 changed files with 37 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ import { apiUrl } from '@lib/functions/Api';
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import {
Alert,
Anchor,
Button,
Divider,
@@ -10,6 +11,7 @@ import {
Loader,
PasswordInput,
Stack,
Text,
TextInput,
VisuallyHidden
} from '@mantine/core';
@@ -30,6 +32,7 @@ import { showLoginNotification } from '../../functions/notifications';
import { useServerApiState } from '../../states/ServerApiState';
import { useUserState } from '../../states/UserState';
import { SsoButton } from '../buttons/SSOButton';
import { errorCodeLink } from '../nav/Alerts';
export function AuthenticationForm() {
const classicForm = useForm({
@@ -341,6 +344,12 @@ export function RegistrationForm() {
))}
</Group>
)}
{!registration_enabled() && !sso_registration() && (
<Alert title={t`Registration not active`} color='orange'>
<Text>{t`This might be related to missing mail settings or could be a deliberate decision.`}</Text>
{errorCodeLink('INVE-W11')}
</Alert>
)}
</>
);
}