It could lead to state where attributes from other object type were displayed instead of the correct ones.

https://fedorahosted.org/freeipa/ticket/2590
--
Petr Vobornik
From fc4bfa0db7e11524597d2466474a5237cf5e8e94 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Mon, 2 Apr 2012 15:00:26 +0200
Subject: [PATCH] Fixed: permission attrs table didn't update its available
 options on load

It could lead to state where attributes from other object type were displayed instead of the correct ones.

https://fedorahosted.org/freeipa/ticket/2590
---
 install/ui/aci.js |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/install/ui/aci.js b/install/ui/aci.js
index ba4a22bf1f2fa4179f093c0bf9eb89a7c7e31c8b..d65d3f88436358dcf96619488d260a5b48cf2bab 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -759,6 +759,13 @@ IPA.permission_target_policy = function (widget_name) {
         attribute_field.reset();
     };
 
+    that.update_attrs = function() {
+
+        var type_select = that.permission_target.widgets.get_widget('type');
+        var type = type_select.save()[0];
+        that.set_attrs_type(type);
+    };
+
     that.post_create = function() {
         that.select_target(that.permission_target.targets[0]);
     };
@@ -853,7 +860,10 @@ IPA.permission_target_policy = function (widget_name) {
                 {
                     name: 'attrs'
                 }
-            ]
+            ],
+            action: function() {
+                that.update_attrs();
+            }
         }
     };
 
-- 
1.7.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to