summaryrefslogtreecommitdiffstats
path: root/install/ui/src
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-03-12 17:00:32 +0100
committerPetr Vobornik <pvoborni@redhat.com>2013-04-10 09:28:04 +0200
commit617114aac420a672c09b3279205402d0afed87ec (patch)
treebac8369d4c202401fcc77835452e036c709d01a2 /install/ui/src
parent7e088a83782de9204af0a5bc120b4c97daae2c72 (diff)
downloadfreeipa-617114aac420a672c09b3279205402d0afed87ec.tar.gz
freeipa-617114aac420a672c09b3279205402d0afed87ec.tar.xz
freeipa-617114aac420a672c09b3279205402d0afed87ec.zip
Don't show trusts pages when trust is not configured
When trust is not configured trust-config page is raising an error. Trusts search page won't find anything either -> no use for the pages -> hiding. https://fedorahosted.org/freeipa/ticket/3333
Diffstat (limited to 'install/ui/src')
-rw-r--r--install/ui/src/freeipa/ipa.js12
-rw-r--r--install/ui/src/freeipa/trust.js14
2 files changed, 25 insertions, 1 deletions
diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js
index 0d5c0bbdc..c1ed72214 100644
--- a/install/ui/src/freeipa/ipa.js
+++ b/install/ui/src/freeipa/ipa.js
@@ -140,7 +140,17 @@ var IPA = function() {
}
}));
-
+ batch.add_command(IPA.command({
+ entity: 'trustconfig',
+ method: 'show',
+ retry: false,
+ on_success: function(data, text_status, xhr) {
+ that.trust_enabled = true;
+ },
+ on_error: function(xhr, text_status, error_thrown) {
+ that.trust_enabled = false;
+ }
+ }));
batch.execute();
};
diff --git a/install/ui/src/freeipa/trust.js b/install/ui/src/freeipa/trust.js
index 25ddb5cdf..7f4f054d1 100644
--- a/install/ui/src/freeipa/trust.js
+++ b/install/ui/src/freeipa/trust.js
@@ -28,6 +28,13 @@ IPA.trust.entity = function(spec) {
var that = IPA.entity(spec);
that.init = function() {
+
+ if (!IPA.trust_enabled) {
+ throw {
+ expected: true
+ };
+ }
+
that.entity_init();
that.builder.search_facet({
@@ -198,6 +205,13 @@ IPA.trust.config_entity = function(spec) {
var that = IPA.entity(spec);
that.init = function() {
+
+ if (!IPA.trust_enabled) {
+ throw {
+ expected: true
+ };
+ }
+
that.entity_init();
that.builder.details_facet({