The HBAC/Sudo rules associations in users, groups, hosts and host
groups have been fixed to use the correct associator and method
names.

Ticket #1438

--
Endi S. Dewata
From 8a66e77d5d16a8150aa147e87813758ffe6e99f8 Mon Sep 17 00:00:00 2001
From: Endi S. Dewata <edew...@redhat.com>
Date: Wed, 6 Jul 2011 10:03:04 -0500
Subject: [PATCH] Fixed HBAC/Sudo rules associations.

The HBAC/Sudo rules associations in users, groups, hosts and host
groups have been fixed to use the correct associator and method
names.

Ticket #1438
---
 install/ui/group.js     |   12 ++++++++++++
 install/ui/host.js      |   12 ++++++++++++
 install/ui/hostgroup.js |   12 ++++++++++++
 install/ui/user.js      |   14 ++++++++++++++
 4 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/install/ui/group.js b/install/ui/group.js
index fbe89a4fd682be30c75c7344e8230fe8bc0ab5af..410a295d4ac98da161cee9455b910660ec608469 100644
--- a/install/ui/group.js
+++ b/install/ui/group.js
@@ -74,6 +74,18 @@ IPA.entity_factories.group =  function () {
             name: 'memberof_role',
             associator: IPA.serial_associator
         }).
+        association_facet({
+            name: 'memberof_hbacrule',
+            associator: IPA.serial_associator,
+            add_method: 'add_user',
+            remove_method: 'remove_user'
+        }).
+        association_facet({
+            name: 'memberof_sudorule',
+            associator: IPA.serial_associator,
+            add_method: 'add_user',
+            remove_method: 'remove_user'
+        }).
         standard_association_facets().
         adder_dialog({
             fields: [
diff --git a/install/ui/host.js b/install/ui/host.js
index 4fdc32fe4ec7a5f9b96dc4eabe7826e3e7903dab..6b5e3606e31c212483fa87f4f92061842bad279c 100644
--- a/install/ui/host.js
+++ b/install/ui/host.js
@@ -85,6 +85,18 @@ IPA.entity_factories.host = function () {
             name: 'memberof_role',
             associator: IPA.serial_associator
         }).
+        association_facet({
+            name: 'memberof_hbacrule',
+            associator: IPA.serial_associator,
+            add_method: 'add_host',
+            remove_method: 'remove_host'
+        }).
+        association_facet({
+            name: 'memberof_sudorule',
+            associator: IPA.serial_associator,
+            add_method: 'add_host',
+            remove_method: 'remove_host'
+        }).
         standard_association_facets().
         adder_dialog({
             width:500,
diff --git a/install/ui/hostgroup.js b/install/ui/hostgroup.js
index 31f4c52504bd2877c092917c9afb8e3ff4bdb1d6..cad77a7a59f9507b38100f26ae4ef2334789a0e4 100644
--- a/install/ui/hostgroup.js
+++ b/install/ui/hostgroup.js
@@ -37,6 +37,18 @@ IPA.entity_factories.hostgroup = function() {
             name: 'memberof_hostgroup',
             associator: IPA.serial_associator
         }).
+        association_facet({
+            name: 'memberof_hbacrule',
+            associator: IPA.serial_associator,
+            add_method: 'add_host',
+            remove_method: 'remove_host'
+        }).
+        association_facet({
+            name: 'memberof_sudorule',
+            associator: IPA.serial_associator,
+            add_method: 'add_host',
+            remove_method: 'remove_host'
+        }).
         standard_association_facets().
         adder_dialog({
             fields:['cn','description']
diff --git a/install/ui/user.js b/install/ui/user.js
index 9617dec990352680864947722a74fa416ac6cda4..9fd14d69ddf447dd3afd194b4e4b611292bdfecc 100644
--- a/install/ui/user.js
+++ b/install/ui/user.js
@@ -119,6 +119,20 @@ IPA.entity_factories.user = function() {
             associator: IPA.serial_associator,
             link: link
         }).
+        association_facet({
+            name: 'memberof_hbacrule',
+            associator: IPA.serial_associator,
+            add_method: 'add_user',
+            remove_method: 'remove_user',
+            link: link
+        }).
+        association_facet({
+            name: 'memberof_sudorule',
+            associator: IPA.serial_associator,
+            add_method: 'add_user',
+            remove_method: 'remove_user',
+            link: link
+        }).
         standard_association_facets({
             link: link
         }).
-- 
1.7.5.1

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

Reply via email to