diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-09-16 16:06:07 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-09-22 16:52:59 +0000 |
commit | 26a2fa027d4e3d5c6953db325080074eedf64d98 (patch) | |
tree | 9df40d29c4b0dd6d6faa24a77dc6de7437c40a88 /install/ui/hbac.js | |
parent | c981627016e0d3c0002214c1d2cc0812a480339a (diff) | |
download | freeipa-26a2fa027d4e3d5c6953db325080074eedf64d98.tar.gz freeipa-26a2fa027d4e3d5c6953db325080074eedf64d98.tar.xz freeipa-26a2fa027d4e3d5c6953db325080074eedf64d98.zip |
Fixed problem enabling/disabling DNS zone.
The details facet for DNS zone has been modified to use dnszone-
enable/disable for idnszoneactive and dnszone-mod for other fields.
Ticket #1813
Diffstat (limited to 'install/ui/hbac.js')
-rw-r--r-- | install/ui/hbac.js | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/install/ui/hbac.js b/install/ui/hbac.js index 53a4edcb7..32b2202fa 100644 --- a/install/ui/hbac.js +++ b/install/ui/hbac.js @@ -321,14 +321,14 @@ IPA.hbacrule_details_facet = function(spec) { that.update = function(on_success, on_error) { - var pkey = IPA.nav.get_state(that.entity.name+'-pkey'); + var args = that.get_primary_key(); var modify_operation = { 'execute': false, 'command': IPA.command({ entity: that.entity.name, method: 'mod', - args: [pkey], + args: args, options: {all: true, rights: true} }) }; @@ -355,7 +355,7 @@ IPA.hbacrule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_user', - args: [pkey], + args: args, options: {all: true, rights: true} }) }, @@ -365,7 +365,7 @@ IPA.hbacrule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_host', - args: [pkey], + args: args, options: {all: true, rights: true} }) }, @@ -375,7 +375,7 @@ IPA.hbacrule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_service', - args: [pkey], + args: args, options: {all: true, rights: true} }) }, @@ -385,7 +385,7 @@ IPA.hbacrule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_sourcehost', - args: [pkey], + args: args, options: {all: true, rights: true} }) } @@ -396,7 +396,7 @@ IPA.hbacrule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'enable', - args: [pkey], + args: args, options: {all: true, rights: true} }) }; @@ -408,15 +408,17 @@ IPA.hbacrule_details_facet = function(spec) { var section_fields = section.fields.values; for (var j=0; j<section_fields.length; j++) { var field = section_fields[j]; - if (!field.is_dirty()) continue; + + // association tables are never dirty, so call + // is_dirty() after checking table values var values = field.save(); if (!values) continue; - var param_info = IPA.get_entity_param(that.entity.name, field.name); + var param_info = field.param_info; // skip primary key - if (param_info && param_info['primary_key']) continue; + if (param_info && param_info.primary_key) continue; var p = field.name.indexOf('_'); if (p >= 0) { @@ -475,11 +477,11 @@ IPA.hbacrule_details_facet = function(spec) { 'name': 'hbac_details_update', 'on_success': function(data, text_status, xhr) { that.refresh(); - if (on_success) on_success(data, text_status, xhr); + if (on_success) on_success.call(this, data, text_status, xhr); }, 'on_error': function(xhr, text_status, error_thrown) { that.refresh(); - if (on_error) on_error(xhr, text_status, error_thrown); + if (on_error) on_error.call(this, xhr, text_status, error_thrown); } }); |