diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2011-12-20 18:09:20 -0600 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-12-21 13:22:45 -0600 |
commit | edd37d20198ba95ebabdbdbf8030f1ec1ecffb6b (patch) | |
tree | 0148f184369ffbb944775763d6040adcb12e0fb6 /install/ui | |
parent | 78e93c11f680dd4bc23fd88f520fb333f0119f7f (diff) | |
download | freeipa.git-edd37d20198ba95ebabdbdbf8030f1ec1ecffb6b.tar.gz freeipa.git-edd37d20198ba95ebabdbdbf8030f1ec1ecffb6b.tar.xz freeipa.git-edd37d20198ba95ebabdbdbf8030f1ec1ecffb6b.zip |
Reload UI when the user changes.
The JSON server has been modified to return the principal name
in all responses. The UI has been modified to keep the principal
obtained during whoami operation and check the principal returned
in subsequent operations. If the principal changes the UI will
reload itself.
Ticket #1400
Diffstat (limited to 'install/ui')
-rw-r--r-- | install/ui/ipa.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js index 5d59a89a..080f4836 100644 --- a/install/ui/ipa.js +++ b/install/ui/ipa.js @@ -120,6 +120,7 @@ var IPA = function() { }, on_success: function(data, text_status, xhr) { that.whoami = data.result[0]; + that.principal = that.whoami.krbprincipalname[0]; } })); @@ -419,6 +420,9 @@ IPA.command = function(spec) { message: data ? xhr.statusText : IPA.get_message('errors.no_response', 'No response') }); + } else if (IPA.principal && data.principal && IPA.principal !== data.principal) { + window.location.reload(); + } else if (data.error) { // error_handler() calls IPA.hide_activity_icon() error_handler.call(this, xhr, text_status, /* error_thrown */ { |