diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2014-05-28 16:50:22 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-06-12 09:56:49 +0200 |
commit | f0c19f907e27f2cd80b68ae32d20befe847ba443 (patch) | |
tree | 155e9cce27c47742b49e24457b891ecf1e3693ec /install | |
parent | 352ef8428c8e2faef8b93b8ecbee9db7e40e1ab6 (diff) | |
download | freeipa-f0c19f907e27f2cd80b68ae32d20befe847ba443.tar.gz freeipa-f0c19f907e27f2cd80b68ae32d20befe847ba443.tar.xz freeipa-f0c19f907e27f2cd80b68ae32d20befe847ba443.zip |
webui: handle "unknown" result of automember-default-group-show
Interface for setting default group is hidden when user doesn't have
necessary rights or if there is some error while loading the state.
https://fedorahosted.org/freeipa/ticket/4356
Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/src/freeipa/automember.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/automember.js b/install/ui/src/freeipa/automember.js index 6faddae07..95f6960d2 100644 --- a/install/ui/src/freeipa/automember.js +++ b/install/ui/src/freeipa/automember.js @@ -617,6 +617,7 @@ IPA.automember.default_group_widget = function(spec) { } that.update(group); + that.set_visible(true); }; that.update = function(group) { @@ -646,7 +647,11 @@ IPA.automember.default_group_widget = function(spec) { that.refresh = function() { var command = that.create_command('show'); + command.retry = false; command.on_success = that.load; + command.on_error = function() { + that.set_visible(false); + }; command.execute(); }; @@ -677,6 +682,7 @@ IPA.automember.default_group_widget = function(spec) { that.create = function(container) { var title = that.get_title(); + that.container = container; that.header = $('<div/>', { 'class': 'automember-header-label', @@ -689,6 +695,7 @@ IPA.automember.default_group_widget = function(spec) { that.group_select.create(that.group_select_node); that.group_select_node.appendTo(container); that.group_select.update([]); // preload groups + that.set_visible(false); }; that.get_title = function() { |