diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-05-25 08:57:47 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2012-06-04 11:26:28 +0200 |
commit | 27b1dace2debe8385ee6193dc8830c656dc48764 (patch) | |
tree | 4c5bc807edfd9ea6310aebeeb6178ec2f14cb99a /install/ui/automount.js | |
parent | 870627de9a6bf0d0731843ea3305aad3a739cac4 (diff) | |
download | freeipa.git-27b1dace2debe8385ee6193dc8830c656dc48764.tar.gz freeipa.git-27b1dace2debe8385ee6193dc8830c656dc48764.tar.xz freeipa.git-27b1dace2debe8385ee6193dc8830c656dc48764.zip |
Removal of illegal options in JSON-RPC calls
Ticket https://fedorahosted.org/freeipa/ticket/2509 bans using non existent options. If such option is supplied command ends with error. It uncovered several cases in Web UI. This patch is fixing these cases.
Automember, Self-service and Delegation don't support 'pkey-only', 'size-limit' and 'rights' option. Pagination and rights check were disabled for them.
Automount map adder dialog was sending options for indirect map even if chosen type was direct (when those for indirect was filled earlier), also it was sending non-existant 'method' option.
https://fedorahosted.org/freeipa/ticket/2760
Diffstat (limited to 'install/ui/automount.js')
-rw-r--r-- | install/ui/automount.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/install/ui/automount.js b/install/ui/automount.js index 5a4d5978..3a4491d8 100644 --- a/install/ui/automount.js +++ b/install/ui/automount.js @@ -112,6 +112,7 @@ IPA.automount.map_entity = function(spec) { { type: 'radio', name: 'method', + enabled: false, //don't use value in add command label: IPA.messages.objects.automountmap.map_type, options: [ { @@ -285,11 +286,15 @@ IPA.automountmap_adder_dialog = function(spec) { var method_widget = that.widgets.get_widget('general.method'); var indirect_section = that.widgets.get_widget('indirect'); var key_field = that.fields.get_field('key'); + var parentmap_field = that.fields.get_field('parentmap'); var direct_input = $('input[value="add"]', method_widget.container); direct_input.change(function() { that.method = 'add'; + key_field.set_enabled(false); + parentmap_field.set_enabled(false); + key_field.set_required(false); indirect_section.set_visible(false); }); @@ -298,6 +303,9 @@ IPA.automountmap_adder_dialog = function(spec) { indirect_input.change(function() { that.method = 'add_indirect'; + key_field.set_enabled(true); + parentmap_field.set_enabled(true); + key_field.set_required(true); indirect_section.set_visible(true); }); |