Skip to content

Commit

Permalink
Display a meaningful error message if login fails with EPERM
Browse files Browse the repository at this point in the history
Resolves #161
  • Loading branch information
pixtron committed Feb 14, 2020
1 parent f5b2a99 commit 48445af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Only set client config after correct instance has been loaded #231
* Do not unbind closed event before successful login #211
* Add hint when account has been unlinked by client #171
* Display a meaningful error message if login fails with EPERM #161


## 1.2.1
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/de-CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
"error.auth.credentials": "Authentifizierung fehlgeschlagen",
"error.auth.mfaNotToken": "Der gewählte Account hat Multi Faktor Authentifizierung (MFA) aktiviert. MFA wird nur mit dem Login Flow \"token\" unterstüzt.",
"error.auth.oidc": "Die Authentifizierung mit dem ausgewählten Identity Provider ist fehlgeschlagen.",
"error.auth.filesystem": "Das Balloon Verzeichniss konnte nicht erstellt werden. Bitte stelle sicher, das nicht bereits ein Verzeichnis besteht, und Balloon Schreibrechte hat.",
"error.auth.filesystem.path": "Pfad zum Balloon Verzeichnis: %s",

"balloonDirSelector.title": "Speicherort für balloonDir wählen",
"balloonDirSelector.error.title": "Fehler",
Expand Down
2 changes: 2 additions & 0 deletions app/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
"error.auth.credentials": "Authentication failed",
"error.auth.mfaNotToken": "The choosen account multi factor authentication (MFA) activated. MFA is only supported with the login flow \"token\".",
"error.auth.oidc": "There was an error authenticating your account with the choosen identity provider.",
"error.auth.filesystem": "The balloon directory could not be created. Please make sure, there is no existing directory and that balloon has write access.",
"error.auth.filesystem.path": "Path to the balloon directory: %s",

"balloonDirSelector.title": "Choose location for the balloon folder",
"balloonDirSelector.error.title": "Error",
Expand Down
5 changes: 5 additions & 0 deletions app/ui/startup/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ function authView() {
case 'E_OIDC_AUTH_SERVER':
$('#startup-auth-error-network-server').show();
break;
case 'EPERM':
var pathMsg = i18n.__('error.auth.filesystem.path', [clientConfig.get('balloonDir')]);
$('#startup-auth-error-filesystem-path').html(pathMsg);
$('#startup-auth-error-filesystem').show();
break;
default:
$('#startup-auth-error-'+type).show();
break;
Expand Down
1 change: 1 addition & 0 deletions app/ui/startup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ <h1>{{i18n 'startup.server.title'}}</h1>
</form>
<div id="startup-auth-error">
<div id="startup-auth-error-network-server" class="error-message">{{i18n 'error.auth.network_server_error'}}</div>
<div id="startup-auth-error-filesystem" class="error-message">{{i18n 'error.auth.filesystem'}} <span id="startup-auth-error-filesystem-path"></span></div>
<div id="startup-auth-error-credentials" class="error-message">{{i18n 'error.auth.credentials'}}</div>
<div id="startup-auth-error-mfa-not-token" class="error-message">{{i18n 'error.auth.mfaNotToken'}}</div>
<div id="startup-auth-error-oidc" class="error-message">{{i18n 'error.auth.oidc'}}</div>
Expand Down

0 comments on commit 48445af

Please sign in to comment.