Skip to content

Commit a986890

Browse files
author
Kristan Kenney
committed
Merge branch 'feature/update-notifier' into feature/user-roles
2 parents b603425 + 5c5909a commit a986890

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

bin/v-list-sys-config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ json_list() {
7575
"DEBUG_MODE": "'$DEBUG_MODE'",
7676
"API": "'$API'",
7777
"API_ALLOWED_IP": "'$API_ALLOWED_IP'",
78+
"UPDATE_AVAILABLE": "'$UPDATE_AVAILABLE'",
7879
"POLICY_SYSTEM_PROTECTED_ADMIN": "'$POLICY_SYSTEM_PROTECTED_ADMIN'",
7980
"POLICY_SYSTEM_HIDE_ADMIN": "'$POLICY_SYSTEM_HIDE_ADMIN'",
8081
"POLICY_SYSTEM_PASSWORD_RESET": "'$POLICY_SYSTEM_PASSWORD_RESET'",

web/templates/admin/list_services.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
<?php if ((isset($_SESSION['FIREWALL_SYSTEM'])) && (!empty($_SESSION['FIREWALL_SYSTEM']))) {?>
88
<a href="/list/firewall/" class="ui-button cancel" dir="ltr"><i class="fas fa-shield-alt status-icon red"></i><?=_('Firewall')?></a>
99
<?php }?>
10+
<!-- Disable Updates Button
1011
<a href="/list/updates/" class="ui-button cancel" dir="ltr"><i class="fas fa-sync status-icon green"></i><?=_('Updates')?></a>
12+
-->
1113
<a href="/list/log/?user=admin&token=<?=$_SESSION['token']?>" class="ui-button cancel" dir="ltr"><i class="fas fa-book-reader status-icon lightblue"></i><?=_('Logs')?></a>
1214
<div class="actions-panel display-inline-block" key-action="js">
1315
<a class="data-controls do_servicerestart ui-button danger cancel">

web/templates/admin/panel.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<i class="fas fa-exchange-alt" title="<?=_('Bandwidth')?>: <?=humanize_usage_size($panel[$user]['U_DISK'])?> <?=humanize_usage_measure($panel[$user]['U_DISK'])?>"></i>&nbsp;&nbsp;<b><?=humanize_usage_size($panel[$user]['U_BANDWIDTH'])?></b> <?=humanize_usage_measure($panel[$user]['U_BANDWIDTH'])?>
3434
</span>
3535
</div>
36+
<!-- Show update notifier for administrators -->
37+
<? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['UPDATE_AVAILABLE'])) {?>
38+
<div class="l-menu__item <?php if($TAB == 'UPDATES' ) echo 'l-menu__item--active' ?>"><a href="/list/updates/" title="<?_('Updates')?>" class="l-profile__username "><i class="fas fa-star status-icon orange"></i></a></div>
39+
<?}?>
3640
<? if (($_SESSION['userContext'] === 'admin') && (isset($_SESSION['look']) && ($user == 'admin'))) {?>
3741
<!-- Do not show notifications panel when impersonating 'admin' user -->
3842
<? } else { ?>
@@ -44,8 +48,8 @@
4448
<? } ?>
4549
<? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin')) {?>
4650
<!-- Hide 'Server Settings' button when impersonating 'admin' or other users -->
47-
<? } else if (($_SESSION['userContext'] === 'admin') && (!isset($_SESSION['look']))) { ?>
48-
<div class="l-menu__item <?php if($TAB == 'SERVER' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'UPDATES' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'IP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'RRD' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'FIREWALL' ) echo 'l-menu__item--active' ?>"><a href="/list/server/" class="l-profile__serversettings" title="<?=_('Server')?>"><i class="fas fa-cog"></i></a></div>
51+
<? } else if (($_SESSION['userContext'] === 'admin') && (!isset($_SESSION['look']))) { ?>
52+
<div class="l-menu__item <?php if($TAB == 'SERVER' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'IP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'RRD' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'FIREWALL' ) echo 'l-menu__item--active' ?>"><a href="/list/server/" class="l-profile__serversettings" title="<?=_('Server')?>"><i class="fas fa-cog"></i></a></div>
4953
<? } ?>
5054
<? if (($_SESSION['userContext'] === 'admin') && (isset($_SESSION['look']) && ($user == 'admin'))) {?>
5155
<!-- Hide 'edit user' entry point from other administrators for default 'admin' account-->

0 commit comments

Comments
 (0)