Skip to content

Commit 7ec8f4e

Browse files
committed
Merge pull request #1006 from nxglabs/sso_main
1 parent 75ad566 commit 7ec8f4e

9 files changed

Lines changed: 22 additions & 8 deletions

File tree

apps/OpenSign/public/locales/de/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,5 +1042,6 @@
10421042
"vertical": "Vertikal",
10431043
"horizontal": "Horizontal",
10441044
"billing": "Abrechnung",
1045-
"console": "Konsole"
1045+
"console": "Konsole",
1046+
"action-prohibited": "Diese Aktion ist für Ihre E-Mail-Domain nicht erlaubt. Bitte wenden Sie sich an Ihren Administrator, um Hilfe zu erhalten."
10461047
}

apps/OpenSign/public/locales/en/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,5 +1042,6 @@
10421042
"vertical": "Vertical",
10431043
"horizontal": "Horizontal",
10441044
"billing": "Billing",
1045-
"console": "Console"
1045+
"console": "Console",
1046+
"action-prohibited": "This action isn't allowed for your email domain. Please contact your administrator for assistance."
10461047
}

apps/OpenSign/public/locales/es/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,5 +1042,6 @@
10421042
"vertical": "Vertical",
10431043
"horizontal": "Horizontal",
10441044
"billing": "Facturación",
1045-
"console": "Consola"
1045+
"console": "Consola",
1046+
"action-prohibited": "Esta acción no está permitida para su dominio de correo electrónico. Por favor, contacte con su administrador para obtener ayuda."
10461047
}

apps/OpenSign/public/locales/fr/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,5 +1042,6 @@
10421042
"vertical": "Vertical",
10431043
"horizontal": "Horizontal",
10441044
"billing": "Facturation",
1045-
"console": "Console"
1045+
"console": "Console",
1046+
"action-prohibited": "Cette action n'est pas autorisée pour votre domaine de messagerie. Veuillez contacter votre administrateur pour obtenir de l'aide."
10461047
}

apps/OpenSign/public/locales/hi/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,5 +1042,6 @@
10421042
"vertical": "वर्टिकल",
10431043
"horizontal": "हॉरिज़ॉन्टल",
10441044
"billing": "बिलिंग",
1045-
"console": "कंसोल"
1045+
"console": "कंसोल",
1046+
"action-prohibited": "यह क्रिया आपके ईमेल डोमेन के लिए अनुमत नहीं है। कृपया सहायता के लिए अपने व्यवस्थापक से संपर्क करें।"
10461047
}

apps/OpenSign/public/locales/it/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,5 +1042,6 @@
10421042
"vertical": "Verticale",
10431043
"horizontal": "Orizzontale",
10441044
"billing": "Fatturazione",
1045-
"console": "Console"
1045+
"console": "Console",
1046+
"action-prohibited": "Questa azione non è consentita per il tuo dominio email. Contatta il tuo amministratore per ricevere assistenza."
10461047
}

apps/OpenSign/src/components/Header.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ const Header = ({ showSidebar, setIsMenu, isConsole }) => {
1919
const { width } = useWindowSize();
2020
const username = localStorage.getItem("username") || "";
2121
const image = localStorage.getItem("profileImg") || dp;
22+
const isAdmin =
23+
localStorage.getItem("Extand_Class") &&
24+
JSON.parse(localStorage.getItem("Extand_Class"))?.[0]?.UserRole ===
25+
"contracts_Admin";
2226
const [isOpen, setIsOpen] = useState(false);
2327
const [applogo, setAppLogo] = useState("");
2428
const [isDarkTheme, setIsDarkTheme] = useState();

apps/OpenSign/src/pages/Login.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ function Login() {
125125
}
126126
} catch (error) {
127127
console.error("Error while logging in user", error);
128-
showToast("danger", "Invalid username/password or region");
128+
if (error?.code === 1001) {
129+
showToast("danger", t("action-prohibited"));
130+
} else {
131+
showToast("danger", "Invalid username/password or region");
132+
}
129133
}
130134
};
131135
const handleLoginBtn = async (event) => {

apps/OpenSignServer/cloud/parsefunction/usersignup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ async function saveUser(userDetails) {
4343
}
4444
export default async function usersignup(request) {
4545
const userDetails = request.params.userDetails;
46-
const user = await saveUser(userDetails);
4746

4847
try {
48+
const user = await saveUser(userDetails);
4949
const extClass = userDetails.role.split('_')[0];
5050

5151
const extQuery = new Parse.Query(extClass + '_Users');

0 commit comments

Comments
 (0)