From 755154318ac6b6a57eee2bdec76debd25e97fd45 Mon Sep 17 00:00:00 2001 From: Serhii Tsymbaliuk Date: Wed, 4 Sep 2019 08:30:13 +0200 Subject: [PATCH] WebUI: Fix changing category on HBAC/Sudo/etc Rule pages No object can be added to a rule when object category is 'all'. So while editing rule there is needed to save actual category value before adding related objects. Ticket: https://pagure.io/freeipa/issue/7961 Signed-off-by: Serhii Tsymbaliuk Reviewed-By: Armando Neto --- install/ui/src/freeipa/association.js | 2 + install/ui/src/freeipa/rule.js | 50 ++++++++++++++++++++++ ipatests/test_webui/test_selinuxusermap.py | 3 +- 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js index 8038e2d41..f10ccb2a5 100644 --- a/install/ui/src/freeipa/association.js +++ b/install/ui/src/freeipa/association.js @@ -668,6 +668,7 @@ IPA.association_table_widget = function (spec) { dialog.get_selected_values(), function(data) { that.refresh(); + that.facet.refresh(); dialog.close(); var succeeded = IPA.get_succeeded(data); @@ -676,6 +677,7 @@ IPA.association_table_widget = function (spec) { }, function() { that.refresh(); + that.facet.refresh(); dialog.close(); } ); diff --git a/install/ui/src/freeipa/rule.js b/install/ui/src/freeipa/rule.js index 7c7e6f1c1..f9cbedc4c 100644 --- a/install/ui/src/freeipa/rule.js +++ b/install/ui/src/freeipa/rule.js @@ -35,6 +35,14 @@ IPA.rule_details_widget = function(spec) { spec = spec || {}; + // Link association table with category option. + for (var i=0; i