summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/ui/src/freeipa/ipa.js12
-rw-r--r--install/ui/src/freeipa/trust.js14
-rw-r--r--install/ui/test/data/ipa_init.json25
3 files changed, 49 insertions, 2 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({
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 38ef3ce4c..98e622cf0 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -2,7 +2,7 @@
"error": null,
"id": null,
"result": {
- "count": 4,
+ "count": 5,
"results": [
{
"error": null,
@@ -786,6 +786,29 @@
"result": true,
"summary": null,
"value": ""
+ },
+ {
+ "error": null,
+ "result": {
+ "cn": [
+ "test.example.com"
+ ],
+ "dn": "cn=test.example.com,cn=etc,dc=test,dc=example,dc=com",
+ "ipantdomainguid": [
+ "ae391b8e-a104-476f-a7ee-146239a31dde"
+ ],
+ "ipantfallbackprimarygroup": [
+ "Default SMB Group"
+ ],
+ "ipantflatname": [
+ "EXAMPLE"
+ ],
+ "ipantsecurityidentifier": [
+ "S-1-5-21-1849636185-3637193423-921922997"
+ ]
+ },
+ "summary": null,
+ "value": "ad"
}
]
}