summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/gui
diff options
context:
space:
mode:
authorJonathan Bauer2015-07-08 11:54:43 +0200
committerJonathan Bauer2015-07-08 11:54:43 +0200
commitbc649c98ab604c4c605f1054d602389a728cccc3 (patch)
tree1cad42598c493bfa8843fa6d9fd4e28b15ccd332 /dozentenmodul/src/main/java/gui
parent[client] authenticator for the direct masterserver login (diff)
downloadtutor-module-bc649c98ab604c4c605f1054d602389a728cccc3.tar.gz
tutor-module-bc649c98ab604c4c605f1054d602389a728cccc3.tar.xz
tutor-module-bc649c98ab604c4c605f1054d602389a728cccc3.zip
[client] user feedback when login fails.
Need to change TAuthorizationException received on failed login by a TAuthenticationException, then we can actually do a proper handling of that error
Diffstat (limited to 'dozentenmodul/src/main/java/gui')
-rw-r--r--dozentenmodul/src/main/java/gui/core/LoginGUI.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/dozentenmodul/src/main/java/gui/core/LoginGUI.java b/dozentenmodul/src/main/java/gui/core/LoginGUI.java
index 7718c0dd..e85f83cc 100644
--- a/dozentenmodul/src/main/java/gui/core/LoginGUI.java
+++ b/dozentenmodul/src/main/java/gui/core/LoginGUI.java
@@ -14,6 +14,7 @@ import org.eclipse.swt.widgets.Shell;
import org.openslx.bwlp.dozmod.thrift.OrganizationCache;
import org.openslx.bwlp.thrift.iface.Organization;
import org.openslx.bwlp.thrift.iface.TAuthenticationException;
+import org.openslx.bwlp.thrift.iface.TAuthorizationException;
import org.openslx.bwlp.thrift.iface.UserInfo;
import org.openslx.thrifthelper.ThriftManager;
@@ -196,8 +197,11 @@ public class LoginGUI extends LoginComposite {
public void postLogin(ReturnCode returnCode, UserInfo user) {
// handle errors first
if (returnCode != ReturnCode.NO_ERROR && user == null) {
- GuiManager.showMessage("Internal error!");
- } else {
+ LOGGER.error("BWLP login failed.");
+ GuiManager.showMessage("Login failed!");
+ }
+ if (returnCode == ReturnCode.NO_ERROR && user != null) {
+ LOGGER.error("BWLP login failed.");
// TODO: FOR DEBUGGING/DEV PURPOSES!
ThriftManager.setSatelliteAddress( "132.230.8.113" );
GuiManager.addContent(new DisclaimerComposite(getShell()));
@@ -205,7 +209,7 @@ public class LoginGUI extends LoginComposite {
}
});
} catch (TAuthenticationException e) {
- GuiManager.showMessage(BAD_AUTH);
+ GuiManager.showMessage(e.getMessage());
}
break;
case SAT: