Ver Fonte

Do not restrict editing of default package

Kristan Kenney há 5 anos atrás
pai
commit
894fee714d
2 ficheiros alterados com 2 adições e 7 exclusões
  1. 1 1
      web/edit/package/index.php
  2. 1 6
      web/templates/admin/list_packages.html

+ 1 - 1
web/edit/package/index.php

@@ -14,7 +14,7 @@ if ($_SESSION['user'] != 'admin') {
 }
 }
 
 
 // Check package argument
 // Check package argument
-if (empty($_GET['package']) || ($_GET['package'] === 'default')) {
+if (empty($_GET['package'])) {
     header("Location: /list/package/");
     header("Location: /list/package/");
     exit;
     exit;
 }
 }

+ 1 - 6
web/templates/admin/list_packages.html

@@ -77,12 +77,7 @@ sort-bandwidth="<?=$data[$key]['U_BANDWIDTH']?>" sort-disk="<?=$data[$key]['U_DI
             <div class="clearfix l-unit__stat-col--left text-right compact-3">
             <div class="clearfix l-unit__stat-col--left text-right compact-3">
                   <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                   <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                       <div class="actions-panel clearfix">
                       <div class="actions-panel clearfix">
-                        <? if ($key == 'default') { ?>
-                          <!-- Restrict editing default package -->
-                        <? } else {?>
-                          <div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/package/?package=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Package')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
-                        <? } ?>
-                        
+                        <div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/package/?package=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Package')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>                      
                         <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="/copy/package/?package=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Copy')?>"><i class="fas fa-clone status-icon teal status-icon dim"></i></a></div>
                         <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="/copy/package/?package=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Copy')?>"><i class="fas fa-clone status-icon teal status-icon dim"></i></a></div>
                         <? if ($key == 'default') { ?>
                         <? if ($key == 'default') { ?>
                           <!-- Restrict deleting default package -->
                           <!-- Restrict deleting default package -->