summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-03-25 15:20:54 +0100
committerPetr Vobornik <pvoborni@redhat.com>2013-05-06 16:22:20 +0200
commit4c290a6083b90dca6d503532bf66ab5f072d190d (patch)
treed382923f1f666d07d6fa7a7a1c12c61c2dff2c54 /install/ui/src/freeipa
parentc111ffb9f26b76761a1b0f0e27721c355645bf98 (diff)
downloadfreeipa.git-4c290a6083b90dca6d503532bf66ab5f072d190d.tar.gz
freeipa.git-4c290a6083b90dca6d503532bf66ab5f072d190d.tar.xz
freeipa.git-4c290a6083b90dca6d503532bf66ab5f072d190d.zip
Proper removal of dns menu item when dns is not installed
https://fedorahosted.org/freeipa/ticket/3236
Diffstat (limited to 'install/ui/src/freeipa')
-rw-r--r--install/ui/src/freeipa/dns.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js
index 5845bbfa..94f9a275 100644
--- a/install/ui/src/freeipa/dns.js
+++ b/install/ui/src/freeipa/dns.js
@@ -20,8 +20,18 @@
*/
-define(['./ipa', './jquery', './net', './navigation', './details', './search', './association',
- './entity'], function(IPA, $, NET, navigation) {
+define([
+ './ipa',
+ './jquery',
+ './net',
+ './navigation',
+ './menu',
+ './phases',
+ './details',
+ './search',
+ './association',
+ './entity'],
+ function(IPA, $, NET, navigation, menu, phases) {
IPA.dns = {
zone_permission_name: 'Manage DNS zone ${dnszone}'
@@ -2539,6 +2549,12 @@ IPA.network_validator = function(spec) {
return that;
};
+phases.on('profile', function() {
+ if (!IPA.dns_enabled) {
+ menu.remove_item('identity/dns');
+ }
+}, 20);
+
IPA.register('dnsconfig', IPA.dns.config_entity);
IPA.register('dnszone', IPA.dns.zone_entity);
IPA.register('dnsrecord', IPA.dns.record_entity);