mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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.
This commit is contained in:
parent
df16d4aff7
commit
84744a2591
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user