summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/association.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/src/freeipa/association.js')
-rw-r--r--install/ui/src/freeipa/association.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js
index a689de43c..d33ec8742 100644
--- a/install/ui/src/freeipa/association.js
+++ b/install/ui/src/freeipa/association.js
@@ -234,7 +234,8 @@ IPA.association_adder_dialog = function(spec) {
var pkey_attr = that.other_entity.metadata.primary_key;
- var selected = that.get_selected_values();
+ var selected = that.normalize_values(that.get_selected_values());
+ var exclude = that.normalize_values(that.exclude);
var results = data.result;
var same_entity = that.entity === that.other_entity;
@@ -243,7 +244,8 @@ IPA.association_adder_dialog = function(spec) {
var pkey = result[pkey_attr][0];
if (same_entity && pkey === that.pkey) continue;
- if (that.exclude.indexOf(pkey) >= 0) continue;
+ pkey = that.normalize_values([pkey])[0];
+ if (exclude.indexOf(pkey) >= 0) continue;
if (selected.indexOf(pkey) >= 0) continue;
that.add_available_value(result);
@@ -285,6 +287,14 @@ IPA.association_adder_dialog = function(spec) {
}).execute();
};
+ that.normalize_values = function(values) {
+ var norm = [];
+ for (var i=0; i<values.length;i++) {
+ norm.push(values[i].toLowerCase());
+ }
+ return norm;
+ };
+
init();
return that;