Skip to content

Commit

Permalink
Technical User cannot login to the App
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasBrazi06 committed Nov 17, 2021
1 parent ac59d59 commit 0475106
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/I18n/languages/cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"registerUnexpectedError": "Nelze vytvořit účet",
"accountLocked": "Váš účet je zablokován",
"accountNotActive": "Váš účet není aktivní",
"technicalUserCannotLoginToUI": "Technical user and cannot login using the application",
"accountAlreadyActive": "Váš účet je již aktivní",
"accountVerifiedSuccess": "Váš účet byl úspěšně aktivován!",
"accountPending": "Váš účet čeká na vyřízení! Zkontrolujte svůj e-mail",
Expand Down
1 change: 1 addition & 0 deletions src/I18n/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"registerUnexpectedError": "Neuen Account erstellen",
"emailAlreadyExists": "Email existiert bereits",
"accountNotActive": "Ihr Konto ist nicht aktiv",
"technicalUserCannotLoginToUI": "Technical user and cannot login using the application",
"accountAlreadyActive": "Ihr Account ist bereits aktiviert",
"accountVerifiedSuccess": "Ihr Account wurde erfolgreich aktiviert!",
"accountPending": "Ihr Konto wurde noch nicht aktiviert, überprüfen Sie Ihre E-Mails!",
Expand Down
1 change: 1 addition & 0 deletions src/I18n/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"registerUnexpectedError": "Cannot create account",
"accountLocked": "Your account is locked",
"accountNotActive": "Your account is not active",
"technicalUserCannotLoginToUI": "Technical user and cannot login using the application",
"accountAlreadyActive": "Your account is already active",
"accountVerifiedSuccess": "Your account has been activated with success!",
"accountPending": "Your account is pending! Check your e-mail",
Expand Down
1 change: 1 addition & 0 deletions src/I18n/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"registerUnexpectedError": "No se ha podido crear la cuenta",
"accountLocked": "Su cuenta ha sido bloqueada",
"accountNotActive": "Su cuenta no ha sido activada",
"technicalUserCannotLoginToUI": "Technical user and cannot login using the application",
"accountAlreadyActive": "Su cuenta ya ha sido activada",
"accountVerifiedSuccess": "¡Su cuenta ha sido activada exitosamente!",
"accountPending": "¡Su cuenta está pendiente! Revise su correo electrónico",
Expand Down
1 change: 1 addition & 0 deletions src/I18n/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"registerUnexpectedError": "Impossible de créer le compte",
"accountLocked": "Votre compte est bloqué",
"accountNotActive": "Votre compte est inactif",
"technicalUserCannotLoginToUI": "Un utilisateur technique ne peut pas se connecter en utilisant l'application",
"accountAlreadyActive": "Votre compte a déjà été activé",
"accountVerifiedSuccess": "Votre compte a été activé avec succès!",
"accountPending": "Votre compte n'est pas activé! Vérifiez vos e-mails",
Expand Down
1 change: 1 addition & 0 deletions src/I18n/languages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"registerUnexpectedError": "Non posso creare un'account",
"accountLocked": "Il tuo account è bloccato",
"accountNotActive": "Il tuo account non è attivo",
"technicalUserCannotLoginToUI": "Technical user and cannot login using the application",
"accountAlreadyActive": "Il tuo account è già attivo",
"accountVerifiedSuccess": "Il tuo account è stato attivato con successo!",
"accountPending": "Il tuo account è in sospeso! Controlla la tua email",
Expand Down
1 change: 1 addition & 0 deletions src/I18n/languages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"registerUnexpectedError": "A conta não pode ser criada",
"accountLocked": "A sua conta está bloqueada",
"accountNotActive": "A sua conta não está ativa",
"technicalUserCannotLoginToUI": "Technical user and cannot login using the application",
"accountAlreadyActive": "A sua conta já está ativa",
"accountVerifiedSuccess": "A sua conta foi ativada com sucesso!",
"accountPending": "A sua conta está pendendte! Por favor Verifique o seu email",
Expand Down
10 changes: 7 additions & 3 deletions src/screens/auth/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import {
TouchableOpacity
} from 'react-native';

import DialogModal from '../../../components/modal/DialogModal';
import ExitAppDialog from '../../../components/modal/exit-app/ExitAppDialog';
import computeModalCommonStyle from '../../../components/modal/ModalCommonStyle';
import computeFormStyleSheet from '../../../FormStyles';
import BaseProps from '../../../types/BaseProps';
import { HTTPError } from '../../../types/HTTPError';
Expand All @@ -21,9 +24,6 @@ import Utils from '../../../utils/Utils';
import BaseScreen from '../../base-screen/BaseScreen';
import AuthHeader from '../AuthHeader';
import computeStyleSheet from '../AuthStyles';
import computeModalCommonStyle from '../../../components/modal/ModalCommonStyle';
import ExitAppDialog from '../../../components/modal/exit-app/ExitAppDialog';
import DialogModal from '../../../components/modal/DialogModal';

export interface Props extends BaseProps {}

Expand Down Expand Up @@ -269,6 +269,10 @@ export default class Login extends BaseScreen<Props, State> {
case HTTPError.USER_ACCOUNT_INACTIVE_ERROR:
Message.showError(I18n.t('authentication.accountNotActive'));
break;
// Technical User
case HTTPError.TECHNICAL_USER_CANNOT_LOG_TO_UI_ERROR:
Message.showError(I18n.t('authentication.technicalUserCannotLoginToUI'));
break;
// Account Pending
case HTTPError.USER_ACCOUNT_PENDING_ERROR:
Message.showError(I18n.t('authentication.accountPending'));
Expand Down
1 change: 1 addition & 0 deletions src/types/HTTPError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export enum HTTPError {
USER_ACCOUNT_CHANGED = 595,
TENANT_COMPONENT_CHANGED = 596,
TENANT_ALREADY_EXIST = 597,
TECHNICAL_USER_CANNOT_LOG_TO_UI_ERROR = 598,

INVALID_CAPTCHA = 530,
INVALID_TOKEN_ERROR = 540,
Expand Down

0 comments on commit 0475106

Please sign in to comment.