This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new be0b9f8 if we hit a 404, it is likely a permission error. inform if
so.
be0b9f8 is described below
commit be0b9f8d25a0f2dde17a795364e833288e183225
Author: Daniel Gruno <[email protected]>
AuthorDate: Sun Jun 6 10:56:09 2021 +0200
if we hit a 404, it is likely a permission error. inform if so.
---
webui/js/source/base-http-extensions.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/webui/js/source/base-http-extensions.js
b/webui/js/source/base-http-extensions.js
index 8f02323..d95a215 100644
--- a/webui/js/source/base-http-extensions.js
+++ b/webui/js/source/base-http-extensions.js
@@ -60,7 +60,10 @@ async function escrow_check() {
async function async_snap(error) {
msg = await error.text();
msg = msg.replace(/<.*?>/g, ""); // strip HTML tags
- modal("An error occured", "An error code %u occured while trying to fetch
%s:\n%s".format(error.status, error.url, msg), "error");
+ if (error.status === 404) {
+ msg += "\n\nYou may need to be logged in with additional permissions
in order to view this resoruce.";
+ }
+ modal("An error occured", "An error code %u occured while trying to fetch
%s:\n%s%s".format(error.status, error.url, msg), "error");
}