mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
Fix occasional 'whoami.data is undefined' error in FreeIPA web UI
'Metadata' phase (Web UI initialization flow) doesn't wait "whoami" response. It causes the error when on the next phase "whoami" data is undefined. To avoid this "whoami" request now has flag async = false, so init_metadata waits until it will be completed. Ticket: https://pagure.io/freeipa/issue/7917 Signed-off-by: Serhii Tsymbaliuk <stsymbal@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
6662e99e17
commit
6a9c20a87c
@ -251,7 +251,10 @@ var IPA = function () {
|
||||
on_success: function(data, text_status, xhr) {
|
||||
that.whoami.metadata = data.result || data;
|
||||
var wa_data = that.whoami.metadata;
|
||||
|
||||
// This AJAX request has no synchronization point,
|
||||
// so we set async = false to make sure that init_metadata
|
||||
// doesn't start before we get whoami response.
|
||||
$.ajaxSetup({async: false});
|
||||
rpc.command({
|
||||
method: wa_data.details || wa_data.command,
|
||||
args: wa_data.arguments,
|
||||
@ -275,6 +278,8 @@ var IPA = function () {
|
||||
}
|
||||
}
|
||||
}).execute();
|
||||
// Restore AJAX options
|
||||
$.ajaxSetup(that.ajax_options);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user