From 95c61c6a0b7d97a9f78fc5b83f38ce2b43cbebc4 Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Thu, 2 Jun 2016 13:07:00 +0200 Subject: [PATCH] Association table can be read only When it is read only it does not show Add and Delete buttons. Part of: https://fedorahosted.org/freeipa/ticket/5906 Reviewed-By: Petr Vobornik --- install/ui/src/freeipa/association.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js index abb032fbb..7579bb095 100644 --- a/install/ui/src/freeipa/association.js +++ b/install/ui/src/freeipa/association.js @@ -428,6 +428,7 @@ IPA.association_table_widget = function (spec) { that.add_method = spec.add_method || 'add_member'; that.remove_method = spec.remove_method || 'remove_member'; + that.read_only = spec.read_only === undefined ? false : spec.read_only; that.add_title = text.get(spec.add_title || '@i18n:association.add.member'); that.remove_title = text.get(spec.remove_title || '@i18n:association.remove.member'); @@ -501,6 +502,8 @@ IPA.association_table_widget = function (spec) { that.table_create(container); + if (that.read_only) return; + that.remove_button = IPA.button_widget({ name: 'remove', label: '@i18n:buttons.remove',