Merge pull request #1006 from nxglabs/sso_main

This commit is contained in:
nxglabs
2025-07-18 14:00:27 +00:00
parent 75ad566d54
commit 7ec8f4ec24
9 changed files with 22 additions and 8 deletions
@@ -1042,5 +1042,6 @@
"vertical": "Vertikal",
"horizontal": "Horizontal",
"billing": "Abrechnung",
"console": "Konsole"
"console": "Konsole",
"action-prohibited": "Diese Aktion ist für Ihre E-Mail-Domain nicht erlaubt. Bitte wenden Sie sich an Ihren Administrator, um Hilfe zu erhalten."
}
@@ -1042,5 +1042,6 @@
"vertical": "Vertical",
"horizontal": "Horizontal",
"billing": "Billing",
"console": "Console"
"console": "Console",
"action-prohibited": "This action isn't allowed for your email domain. Please contact your administrator for assistance."
}
@@ -1042,5 +1042,6 @@
"vertical": "Vertical",
"horizontal": "Horizontal",
"billing": "Facturación",
"console": "Consola"
"console": "Consola",
"action-prohibited": "Esta acción no está permitida para su dominio de correo electrónico. Por favor, contacte con su administrador para obtener ayuda."
}
@@ -1042,5 +1042,6 @@
"vertical": "Vertical",
"horizontal": "Horizontal",
"billing": "Facturation",
"console": "Console"
"console": "Console",
"action-prohibited": "Cette action n'est pas autorisée pour votre domaine de messagerie. Veuillez contacter votre administrateur pour obtenir de l'aide."
}
@@ -1042,5 +1042,6 @@
"vertical": "वर्टिकल",
"horizontal": "हॉरिज़ॉन्टल",
"billing": "बिलिंग",
"console": "कंसोल"
"console": "कंसोल",
"action-prohibited": "यह क्रिया आपके ईमेल डोमेन के लिए अनुमत नहीं है। कृपया सहायता के लिए अपने व्यवस्थापक से संपर्क करें।"
}
@@ -1042,5 +1042,6 @@
"vertical": "Verticale",
"horizontal": "Orizzontale",
"billing": "Fatturazione",
"console": "Console"
"console": "Console",
"action-prohibited": "Questa azione non è consentita per il tuo dominio email. Contatta il tuo amministratore per ricevere assistenza."
}
+4
View File
@@ -19,6 +19,10 @@ const Header = ({ showSidebar, setIsMenu, isConsole }) => {
const { width } = useWindowSize();
const username = localStorage.getItem("username") || "";
const image = localStorage.getItem("profileImg") || dp;
const isAdmin =
localStorage.getItem("Extand_Class") &&
JSON.parse(localStorage.getItem("Extand_Class"))?.[0]?.UserRole ===
"contracts_Admin";
const [isOpen, setIsOpen] = useState(false);
const [applogo, setAppLogo] = useState("");
const [isDarkTheme, setIsDarkTheme] = useState();
+5 -1
View File
@@ -125,7 +125,11 @@ function Login() {
}
} catch (error) {
console.error("Error while logging in user", error);
showToast("danger", "Invalid username/password or region");
if (error?.code === 1001) {
showToast("danger", t("action-prohibited"));
} else {
showToast("danger", "Invalid username/password or region");
}
}
};
const handleLoginBtn = async (event) => {
@@ -43,9 +43,9 @@ async function saveUser(userDetails) {
}
export default async function usersignup(request) {
const userDetails = request.params.userDetails;
const user = await saveUser(userDetails);
try {
const user = await saveUser(userDetails);
const extClass = userDetails.role.split('_')[0];
const extQuery = new Parse.Query(extClass + '_Users');