Only allow show zones for System::View permission

This commit is contained in:
Isaac Connor 2021-03-12 10:29:13 -05:00
parent ba00bee4b8
commit 1ae1a89abf
1 changed files with 10 additions and 8 deletions

View File

@ -154,14 +154,16 @@ echo getNavBarHTML();
if ( $showControl ) {
echo makeLink('?view=control', translate('Control'));
}
if ( $showZones ) {
?>
<a id="HideZones" href="?view=montage&amp;showZones=0"><?php echo translate('Hide Zones')?></a>
<?php
} else {
?>
<a id="ShowZones" href="?view=montage&amp;showZones=1"><?php echo translate('Show Zones')?></a>
<?php
if ( canView('System') ) {
if ( $showZones ) {
?>
<a id="HideZones" href="?view=montage&amp;showZones=0"><?php echo translate('Hide Zones')?></a>
<?php
} else {
?>
<a id="ShowZones" href="?view=montage&amp;showZones=1"><?php echo translate('Show Zones')?></a>
<?php
}
}
?>
</div>