This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 7cc99b90a7 AMBARI-26307: Knox SSO fails to login into Ambari (#3941)
7cc99b90a7 is described below
commit 7cc99b90a7237ddd09608323e026d774418cec90
Author: Prabhjyot Singh <[email protected]>
AuthorDate: Mon Feb 10 20:12:25 2025 -0500
AMBARI-26307: Knox SSO fails to login into Ambari (#3941)
* AMBARI-26307: Knox SSO fails to login into Ambari
---
ambari-web/app/router.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 1330cf302b..d17446041c 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -284,15 +284,15 @@ App.Router = Em.Router.extend({
var dfd = $.Deferred();
var self = this;
var auth = App.db.getAuthenticated();
- this.getClusterDataRequest().always(function (xhr) {
- if (xhr) {
+ this.getClusterDataRequest().always(function (xhr, textStatus,
jqXHRorErrorThrown) {
+ if (xhr && textStatus == 'success') {
// if server knows the user and user authenticated by UI
if (auth) {
dfd.resolve(self.get('loggedIn'));
// if server knows the user but UI don't, check the response header
// and try to authorize
- } else if (xhr.getResponseHeader('User')) {
- var user = xhr.getResponseHeader('User');
+ } else if (jqXHRorErrorThrown.getResponseHeader('User')) {
+ var user = jqXHRorErrorThrown.getResponseHeader('User');
App.ajax.send({
name: 'router.afterLogin',
sender: self,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]