diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2011-09-27 10:00:27 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-09-27 14:44:38 +0000 |
commit | 84744a25915f4a6ff84809f17daae95d170d3b98 (patch) | |
tree | 13741f26508dd047b24ddec54a4fb3b6b70b5a44 /install | |
parent | df16d4aff73f95d3cdac4f0d3504e4c73e936789 (diff) | |
download | freeipa-84744a25915f4a6ff84809f17daae95d170d3b98.tar.gz freeipa-84744a25915f4a6ff84809f17daae95d170d3b98.tar.xz freeipa-84744a25915f4a6ff84809f17daae95d170d3b98.zip |
Fixed: Enrolment dialog offers to add entity to reflexive association.
https://fedorahosted.org/freeipa/ticket/1883
It's a regression introduced by patch for #1797
Reproduce:
* show user group foo
* click on user groups tab
* click on enroll button
Result:
User group 'foo' is listed in available list.
Expected result:
User group 'foo' is not listed in available list.
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/association.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/install/ui/association.js b/install/ui/association.js index 47d8db173..f2ef11dac 100644 --- a/install/ui/association.js +++ b/install/ui/association.js @@ -180,10 +180,12 @@ IPA.association_adder_dialog = function(spec) { var selected = that.get_selected_values(); var results = data.result; + var same_entity = that.entity.name === other_entity.name; for (var i=0; i<results.count; i++) { var result = results.result[i]; var pkey = result[pkey_attr][0]; + if (same_entity && pkey === that.pkey) continue; if (that.exclude.indexOf(pkey) >= 0) continue; if (selected.indexOf(pkey) >= 0) continue; |