diff options
author | Adam Young <ayoung@redhat.com> | 2011-01-14 13:19:56 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-01-14 13:19:56 -0500 |
commit | 91fae67fa48d7fa1f4213bad65000d3669a8c8b2 (patch) | |
tree | 429de81d3d2180a91b115eb43a5774daf1a73b40 /install | |
parent | c385db4fc017f3319ff4d57bc19efe81585bc5dd (diff) | |
download | freeipa-91fae67fa48d7fa1f4213bad65000d3669a8c8b2.tar.gz freeipa-91fae67fa48d7fa1f4213bad65000d3669a8c8b2.tar.xz freeipa-91fae67fa48d7fa1f4213bad65000d3669a8c8b2.zip |
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
Diffstat (limited to 'install')
-rw-r--r-- | install/static/details.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/install/static/details.js b/install/static/details.js index b5c74a62c..2b163423b 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -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); } |