webui: use API call ca_is_enabled instead of enable_ra env variable.

To be consistent with backend code.

https://fedorahosted.org/freeipa/ticket/5622

Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
This commit is contained in:
Petr Vobornik
2016-01-20 19:00:33 +01:00
parent a3f8e8e71f
commit 31f42bc2e1
3 changed files with 15 additions and 1 deletions

View File

@@ -612,7 +612,7 @@ IPA.cert.load_policy = function(spec) {
};
IPA.cert.is_enabled = function() {
return !!IPA.env.enable_ra;
return !!IPA.ca_enabled;
};
IPA.cert.view_action = function(spec) {

View File

@@ -232,6 +232,14 @@ var IPA = function () {
}
}));
batch.add_command(rpc.command({
entity: 'ca',
method: 'is_enabled',
on_success: function(data, text_status, xhr) {
that.ca_enabled = data.result;
}
}));
batch.execute();
};

View File

@@ -975,6 +975,12 @@
{
"error": null,
"result": 1
},
{
"error": null,
"result": true,
"summary": null,
"value": null
}
]
}