mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Proper removal of dns menu item when dns is not installed
https://fedorahosted.org/freeipa/ticket/3236
This commit is contained in:
@@ -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