Users do not have add/delete permission in self-service mode, so
the search facet was modified to hide the Add/Delete buttons.

Ticket #2188

--
Endi S. Dewata
From 7eb8e5a383d69b7b490d4e480a705c5efed6fb34 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edew...@redhat.com>
Date: Tue, 31 Jan 2012 10:44:34 -0600
Subject: [PATCH] Hide Add/Delete buttons in self-service mode.

Users do not have add/delete permission in self-service mode, so
the search facet was modified to hide the Add/Delete buttons.

Ticket #2188
---
 install/ui/search.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/install/ui/search.js b/install/ui/search.js
index 4f26c0407f55b758bc32b3df899bd5af72d6ba29..30b4d3dd0a378e0855c4b7ccb41c14d63a199006 100644
--- a/install/ui/search.js
+++ b/install/ui/search.js
@@ -114,6 +114,13 @@ IPA.search_facet = function(spec) {
                 return false;
             }
         }).appendTo(that.controls);
+
+        var self_service = IPA.nav.name === 'self-service';
+
+        if (self_service) {
+            that.remove_button.css('display', 'none');
+            that.add_button.css('display', 'none');
+        }
     };
 
     that.show = function() {
-- 
1.7.7.1.msysgit.0

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

Reply via email to