@scalio-cloud/ui 0.87.0 → 0.87.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/react/mail.js +8 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalio-cloud/ui",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.1",
|
|
4
4
|
"description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
|
|
5
5
|
"license": "SEE LICENSE IN README.md",
|
|
6
6
|
"private": false,
|
package/react/mail.js
CHANGED
|
@@ -28,6 +28,7 @@ const LABELS = {
|
|
|
28
28
|
rightsCheck: "Status prüfen",
|
|
29
29
|
rightsState: { ok: "Senderecht vorhanden", missing: "Senderecht fehlt" },
|
|
30
30
|
rightsUnknown: "Senden Sie eine Testmail, um das Senderecht zu bestätigen.",
|
|
31
|
+
rightsRefused: "Microsoft 365 hat die Testmail abgelehnt (Zugriff verweigert), obwohl das Senderecht gesetzt scheint. Exchange hat es noch nicht übernommen oder es gilt nicht für dieses Postfach: Prüfen Sie das Postfach und das Senderecht in Exchange Online und versuchen Sie es später nochmals.",
|
|
31
32
|
rightsSettling: (at) => `Die App hat das Senderecht eben geändert. Exchange übernimmt es bis spätestens ${at}; bis dahin kann Microsoft die Mail noch ablehnen.`,
|
|
32
33
|
rightsScriptAlso: "Lieber selbst ausführen? Skript anzeigen",
|
|
33
34
|
testFirst: "Speichern Sie zuerst Weg und Postfach.",
|
|
@@ -123,6 +124,7 @@ const LABELS = {
|
|
|
123
124
|
rightsCheck: "Check status",
|
|
124
125
|
rightsState: { ok: "Send right in place", missing: "Send right missing" },
|
|
125
126
|
rightsUnknown: "Send a test mail to confirm the send right.",
|
|
127
|
+
rightsRefused: "Microsoft 365 refused the test mail (access denied) although the send right seems to be set. Exchange has not applied it yet or it does not cover this mailbox: check the mailbox and the send right in Exchange Online and try again later.",
|
|
126
128
|
rightsSettling: (at) => `The app has just changed the send right. Exchange applies it by ${at} at the latest; until then Microsoft may still refuse the mail.`,
|
|
127
129
|
rightsScriptAlso: "Rather run it yourself? Show script",
|
|
128
130
|
testFirst: "Save the way and the mailbox first.",
|
|
@@ -377,12 +379,15 @@ function MailTransport(props) {
|
|
|
377
379
|
};
|
|
378
380
|
// After a test mail the status is read again (the backend may note Microsoft's answer). A test mail that went out
|
|
379
381
|
// through Microsoft 365 shows the right is there, also when the app can not ask Exchange (state «unknown»).
|
|
380
|
-
const confirmRights = (delivered) => {
|
|
382
|
+
const confirmRights = (delivered, err) => {
|
|
381
383
|
if (!form || !form.send_rights || !client.rightsStatus) return Promise.resolve();
|
|
382
384
|
const viaM365 = form.provider === "graph" || form.provider === "tenant";
|
|
383
385
|
return client.rightsStatus().then((r) => {
|
|
384
386
|
if (!r || !r.mode) return;
|
|
385
|
-
|
|
387
|
+
// Microsoft refused with «access denied» although the backend says «ok»: the right does not work (yet), do not claim it does
|
|
388
|
+
const denied = !delivered && viaM365 && r.state === "ok" && /403|AccessDenied/i.test(String((err && (err.message || err.code || err.status)) || err || ""));
|
|
389
|
+
setRightsInfo(delivered && viaM365 && r.state === "unknown" ? Object.assign({}, r, { state: "ok", detail: "" })
|
|
390
|
+
: denied ? Object.assign({}, r, { state: "missing", detail: L.rightsRefused, settling_until: null }) : r);
|
|
386
391
|
}).catch(() => undefined);
|
|
387
392
|
};
|
|
388
393
|
const test = async () => {
|
|
@@ -400,7 +405,7 @@ function MailTransport(props) {
|
|
|
400
405
|
const text = (props.formatError || errorText)(err);
|
|
401
406
|
if (props.notify) props.notify(text, "error");
|
|
402
407
|
else setTestMsg({ tone: "error", text });
|
|
403
|
-
confirmRights(false);
|
|
408
|
+
confirmRights(false, err);
|
|
404
409
|
}
|
|
405
410
|
setTesting(false);
|
|
406
411
|
};
|