mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
null pkey
If the pkey is null, send an empty array. If the pkey is not null, send and array of length 1 with the pkey in it. Addresses: https://fedorahosted.org/freeipa/ticket/767
This commit is contained in:
parent
c385db4fc0
commit
91fae67fa4
@ -731,8 +731,6 @@ IPA.details_update = function (on_win, on_fail)
|
||||
var that = this;
|
||||
var entity_name = that.entity_name;
|
||||
|
||||
var pkey = that.get_primary_key();
|
||||
|
||||
function update_on_win(data, text_status, xhr) {
|
||||
if (on_win)
|
||||
on_win(data, text_status, xhr);
|
||||
@ -748,13 +746,6 @@ IPA.details_update = function (on_win, on_fail)
|
||||
on_fail(xhr, text_status, error_thrown);
|
||||
}
|
||||
|
||||
/*
|
||||
The check
|
||||
if (!pkey) { return; }
|
||||
used to happen here, but it breaks krbtpolicy, which allows a null pkey
|
||||
and usually requires it.
|
||||
*/
|
||||
|
||||
var values;
|
||||
var modlist = {'all': true, 'setattr': [], 'addattr': [], 'rights': true};
|
||||
var attrs_wo_option = {};
|
||||
@ -800,7 +791,14 @@ IPA.details_update = function (on_win, on_fail)
|
||||
}
|
||||
}
|
||||
|
||||
IPA.cmd('mod', [pkey], modlist, update_on_win, null, entity_name);
|
||||
var pkey = that.get_primary_key() ;
|
||||
if (pkey){
|
||||
pkey = [pkey];
|
||||
}else{
|
||||
pkey = [];
|
||||
}
|
||||
|
||||
IPA.cmd('mod', pkey, modlist, update_on_win, null, entity_name);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user