summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-01-16 13:50:26 -0800
committerIvan Kohler <ivan@freeside.biz>2014-01-16 13:50:26 -0800
commit863a22e44d49481109c956b0a0533b6672e3ca93 (patch)
tree0893cdb7c90f104b77e94d9e984d5ca8686f6c5d
parent63d5cd3d1b5f7f7acf42eb9e0bb9c9c1f5d4dd47 (diff)
fix agent self-editing of templates without other config, RT#26766
-rw-r--r--httemplate/elements/menu.html11
1 files changed, 7 insertions, 4 deletions
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index 5225cce30..99f5e1168 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -766,11 +766,14 @@ $config_menu{'Network Monitoring'} = [ \%config_nms, '' ]
if $curuser->access_right('Configure network monitoring')
&& $conf->config('network_monitoring_system') eq 'Torrus_Internal';
-if ( $curuser->access_right('Configuration' )
- || $curuser->access_right('Edit advertising sources')
- || $curuser->access_right('Edit global advertising sources')
+if ( $curuser->access_right([ 'Configuration',
+ 'View templates',
+ 'View global templates',
+ 'Edit templates',
+ 'Edit global templates',
+ ])
) {
- $config_menu{separator9} = '';
+ $config_menu{separator9} = '' if keys %config_menu;
$config_menu{'Miscellaneous'} = [ \%config_misc, '' ];
}