modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/util/rpc/TrackingRequestCallback.java
| 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 50aed986a19b2e1cbd7d13e179c0342857d22854
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Mon Dec 16 19:23:37 2013 +0100
[BZ 970181] - RHQ doesn't work after restart with open GUI in web browser. - if
the server restarts at the background, the session id is lost on the server therefore we
can't allow the logged user to continue sending the requests without a new AuthN. It
would be a security risk to allow it. Now, if the server restarts the UI requires the new
log in (the login form is displayed).
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/util/rpc/TrackingRequestCallback.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/util/rpc/TrackingRequestCallback.java
index 07893f6..b443c1a 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/util/rpc/TrackingRequestCallback.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/util/rpc/TrackingRequestCallback.java
@@ -23,6 +23,7 @@ import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.Response;
import org.rhq.coregui.client.CoreGUI;
+import org.rhq.coregui.client.LoginView;
import org.rhq.coregui.client.UserSessionManager;
import org.rhq.coregui.client.util.Log;
@@ -86,6 +87,11 @@ public class TrackingRequestCallback implements RequestCallback {
switch (statusCode) {
case STATUS_CODE_OK:
+ if (response != null && response.getText() != null &&
response.getText().isEmpty()
+ && !LoginView.isLoginShowing()) { // this happen when the RHQ
server was restarted
+ new LoginView().showLoginDialog();
+ break;
+ }
RPCTracker.getInstance().succeedCall(this);
callback.onResponseReceived(request, response);
break;
Show replies by date