Proper removal of dns menu item when dns is not installed
https://fedorahosted.org/freeipa/ticket/3236
This commit is contained in:
1 parent
c111ffb9f2
commit
4c290a6083
1 file changed
+18
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user