diff --git a/bureau/admin/adm_doedit.php b/bureau/admin/adm_doedit.php index cd1bbe07..c6f9a4e0 100644 --- a/bureau/admin/adm_doedit.php +++ b/bureau/admin/adm_doedit.php @@ -35,7 +35,10 @@ if (!$admin->enabled) { __("This page is restricted to authorized staff"); exit(); } -if (!$admin->checkcreator($uid)) { + +$subadmin=variable_get("subadmin_restriction"); + +if ($subadmin==0 && !$admin->checkcreator($uid)) { __("This page is restricted to authorized staff"); exit(); } diff --git a/bureau/admin/adm_edit.php b/bureau/admin/adm_edit.php index 9471444a..a82a1c64 100644 --- a/bureau/admin/adm_edit.php +++ b/bureau/admin/adm_edit.php @@ -42,7 +42,9 @@ $fields = array ( ); getFields($fields); -if (!$admin->checkcreator($uid)) { +$subadmin=variable_get("subadmin_restriction"); + +if ($subadmin==0 && !$admin->checkcreator($uid)) { __("This page is restricted to authorized staff"); exit(); } diff --git a/bureau/admin/adm_list.php b/bureau/admin/adm_list.php index 9d0cab33..b69f880c 100644 --- a/bureau/admin/adm_list.php +++ b/bureau/admin/adm_list.php @@ -40,17 +40,20 @@ if (!$admin->enabled) { $fields = array ( "show" => array ("request", "string", ""), - "creator_id" => array("request", "integer", 2000), + "creator" => array("request", "integer", 0), ); getFields($fields); -if ($show && $cuid != 2000) +$subadmin=variable_get("subadmin_restriction"); + +if ($subadmin==0 && $show && $cuid != 2000) { __("This page is restricted to authorized staff"); exit(); } -$r=$admin->get_list($show == 'all' ? 1 : 0, $creator_id); + +$r=$admin->get_list($show == 'all' ? 1 : 0, $creator); ?>
@@ -64,12 +67,12 @@ $r=$admin->get_list($show == 'all' ? 1 : 0, $creator_id); ' . _('List all the accounts') . ''; - if ($cuid == 2000) { + if ($subadmin!=0 || $cuid==2000) { $list_creators = $admin->get_creator_list(); $infos_creators = array(); foreach ($list_creators as $key => $val) { - $infos_creators[] = '' . $val['login'] . ''; + $infos_creators[] = '' . $val['login'] . ''; } if (count($infos_creators)) { @@ -117,7 +120,6 @@ while (list($key,$val)=each($r)) ?>