|
1 | 1 | <div class="l-center"> |
2 | 2 | <div class="l-sort clearfix noselect"> |
3 | 3 | <div class="l-unit-toolbar__buttonstrip"> |
4 | | - <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) {?> |
| 4 | + <? if ($read_only === 'true') {?> |
5 | 5 | <!-- Hide item creation button when impersonating 'admin' account --> |
6 | 6 | <? } else { ?> |
7 | 7 | <a href="/schedule/backup/?token=<?=$_SESSION['token']?>" class="ui-button cancel" dir="ltr"><i class="fas fa-plus-circle status-icon green"></i><?=_('Create Backup')?></a> |
|
18 | 18 | <button type="submit" class="l-sort-toolbar__filter-apply" onclick="return doSearch('/search/')" value="" title="<?=_('Search')?>"><i class="fas fa-search"></i></button> |
19 | 19 | </form> |
20 | 20 | </td> |
21 | | - <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) {?> |
| 21 | + <? if ($read_only === 'true') {?> |
22 | 22 | <!-- Hide bulk actions for domain items when impersonating 'admin' account--> |
23 | 23 | <? } else { ?> |
24 | 24 | <td> |
|
46 | 46 | <div class="l-unit__col l-unit__col--right"> |
47 | 47 | <div> |
48 | 48 | <div class="clearfix l-unit__stat-col--left super-compact"> |
49 | | - <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) { $display_mode = 'disabled'; } ?> |
50 | 49 | <input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" title="<?=_('Select all')?>" onChange="checkedAll('objects');" <?=$display_mode;?>> |
51 | 50 | </div> |
52 | 51 | <div class="clearfix l-unit__stat-col--left wide-4"><b><?php print _('File Name');?></b></div> |
|
84 | 83 | <input id="check<?php echo $i ?>" class="ch-toggle" type="checkbox" title="<?=_('Select')?>" name="backup[]" value="<?php echo $key ?>" <?=$display_mode;?>> |
85 | 84 | </div> |
86 | 85 | <div class="clearfix l-unit__stat-col--left wide-4 truncate"> |
87 | | - <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) {?> |
| 86 | + <? if ($read_only === 'true') {?> |
88 | 87 | <b><?=$key?></b> |
89 | 88 | <? } else { ?> |
90 | 89 | <b><a href="/list/backup/?backup=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('restore')?>"><?=$key?></a></b> |
|
94 | 93 | <div class="clearfix l-unit__stat-col--left compact-4 text-right"> |
95 | 94 | <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect"> |
96 | 95 | <div class="actions-panel clearfix"> |
97 | | - <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) {?> |
| 96 | + <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin') && ($read_only === 'true')) {?> |
98 | 97 | <!-- Restrict ability to restore or delete backups when impersonating 'admin' account --> |
99 | 98 | |
100 | 99 | <? } else { ?> |
101 | 100 | <div class="actions-panel__col actions-panel__download shortcut-d" key-action="href"><a href="/download/backup/?backup=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('download')?>"><i class="fas fa-file-download status-icon lightblue status-icon dim"></i></a></div> |
| 101 | + <? if ($read_only === 'false') {?> |
102 | 102 | <div class="actions-panel__col actions-panel__list shortcut-enter" key-action="href"><a href="/list/backup/?backup=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('restore')?>"><i class="fas fa-undo status-icon green status-icon dim"></i></a></div> |
103 | 103 | <div class="actions-panel__col actions-panel__delete shortcut-delete" key-action="js"> |
104 | 104 | <a id="delete_link_<?=$i?>" class="data-controls do_delete" title="<?=_('delete')?>"> |
|
109 | 109 | </div> |
110 | 110 | </a> |
111 | 111 | </div> |
| 112 | + <? } ?> |
112 | 113 | <? } ?> |
113 | 114 | </div> |
114 | 115 | </div> |
|
0 commit comments