diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-06-12 16:01:26 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-06-13 17:42:30 +0200 |
commit | daa9b4e348bcf95b989f5ef7fb40b120a8ced580 (patch) | |
tree | d9e00b0f22ba7f2df8856e6f1290284484b947be /install | |
parent | e20130574382c620a1d450844efa1368e9f3de7d (diff) | |
download | freeipa-daa9b4e348bcf95b989f5ef7fb40b120a8ced580.tar.gz freeipa-daa9b4e348bcf95b989f5ef7fb40b120a8ced580.tar.xz freeipa-daa9b4e348bcf95b989f5ef7fb40b120a8ced580.zip |
Regression fix: rule table with ext. member support doesn't offer any items
There is a JS error.
Rule tables with external member has more than one column and therefore exclude parameter for adder dialog is not array of strings but array of objects. normalize_values function can't work with it and causes JS error.
This patch creates proper exclude array before passing it to adder dialog.
https://fedorahosted.org/freeipa/ticket/3711
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/src/freeipa/rule.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/install/ui/src/freeipa/rule.js b/install/ui/src/freeipa/rule.js index 959aec462..f573b56d4 100644 --- a/install/ui/src/freeipa/rule.js +++ b/install/ui/src/freeipa/rule.js @@ -149,6 +149,14 @@ IPA.rule_association_table_widget = function(spec) { title = title.replace('${primary_key}', pkey); title = title.replace('${other_entity}', other_entity_label); + var exclude = that.values; + if (that.external) { + exclude = []; + for (var i=0; i<that.values.length; i++) { + exclude.push(that.values[i][that.name]); + } + } + return IPA.rule_association_adder_dialog({ title: title, pkey: pkey, @@ -156,7 +164,7 @@ IPA.rule_association_table_widget = function(spec) { attribute_member: that.attribute_member, entity: that.entity, external: that.external, - exclude: that.values + exclude: exclude }); }; |