summaryrefslogtreecommitdiffstats
path: root/install/ui
diff options
context:
space:
mode:
authorPavel Vomacka <pvomacka@redhat.com>2016-06-02 13:07:00 +0200
committerPetr Vobornik <pvoborni@redhat.com>2016-06-14 18:27:31 +0200
commit95c61c6a0b7d97a9f78fc5b83f38ce2b43cbebc4 (patch)
treeecf5392de8d222f3723dcecbfb73f03ddc97528f /install/ui
parent5760cc918247746a4e55adc118bdbd9ffb01b78f (diff)
downloadfreeipa-95c61c6a0b7d97a9f78fc5b83f38ce2b43cbebc4.tar.gz
freeipa-95c61c6a0b7d97a9f78fc5b83f38ce2b43cbebc4.tar.xz
freeipa-95c61c6a0b7d97a9f78fc5b83f38ce2b43cbebc4.zip
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 <pvoborni@redhat.com>
Diffstat (limited to 'install/ui')
-rw-r--r--install/ui/src/freeipa/association.js3
1 files changed, 3 insertions, 0 deletions
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',