Skip to content

Commit f03c914

Browse files
author
Kristan Kenney
committed
Restrict ability to add cron jobs and disable/enable notifications
1 parent ae13191 commit f03c914

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

web/templates/admin/list_cron.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<div class="l-center">
22
<div class="l-sort clearfix noselect">
33
<div class="l-unit-toolbar__buttonstrip">
4-
<a href="/add/cron/" id="btn-create" class="ui-button cancel" dir="ltr"><i class="fas fa-plus-circle status-icon green"></i><?=_('Add Cron Job')?></a>
5-
<? if($panel[$user]['CRON_REPORTS'] == 'yes') { ?>
6-
<a class="ui-button cancel" dir="ltr" href="/delete/cron/reports/?token='.$_SESSION['token'].'"><i class="fas fa-toggle-off status-icon green"></i><?=_('turn off notifications')?></a>
4+
<? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin')) {?>
5+
<!-- Restrict ability to add cron jobs or disable/enable cron job notifications when impersonating 'admin' account -->
76
<? } else { ?>
8-
<a class="ui-button cancel" dir="ltr" href="/add/cron/reports/?token='.$_SESSION['token'].'"><i class="fas fa-toggle-off status-icon grey"></i><?=_('turn on notifications')?></a>
7+
<a href="/add/cron/" id="btn-create" class="ui-button cancel" dir="ltr"><i class="fas fa-plus-circle status-icon green"></i><?=_('Add Cron Job')?></a>
8+
<? if($panel[$user]['CRON_REPORTS'] == 'yes') { ?>
9+
<a class="ui-button cancel" dir="ltr" href="/delete/cron/reports/?token='.$_SESSION['token'].'"><i class="fas fa-toggle-off status-icon green"></i><?=_('turn off notifications')?></a>
10+
<? } else { ?>
11+
<a class="ui-button cancel" dir="ltr" href="/add/cron/reports/?token='.$_SESSION['token'].'"><i class="fas fa-toggle-off status-icon grey"></i><?=_('turn on notifications')?></a>
12+
<? } ?>
913
<? } ?>
1014
</div>
1115
<ul class="context-menu sort-order animated fadeIn" style="display:none;">

0 commit comments

Comments
 (0)