From: x2003bruneau Date: Tue, 11 Jul 2006 15:37:56 +0000 (+0000) Subject: Fix permission check on admin pages X-Git-Tag: xorg/0.9.10~15 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=627234238a8b14c05e725f86a4c1d13f1e3b11cf;p=platal.git Fix permission check on admin pages git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.10@433 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/include/platal/session.inc.php b/include/platal/session.inc.php index 3e30719..4041a42 100644 --- a/include/platal/session.inc.php +++ b/include/platal/session.inc.php @@ -36,7 +36,7 @@ function check_perms() require_once('diogenes/diogenes.core.logger.inc.php'); $_SESSION['log']->log("noperms",$_SERVER['PHP_SELF']); } - $page->kill("Tu n'as pas les permissions nécessaires pour accéder à cette page."); + $page->kill("Tu n'as pas les permissions nécessaires pour accéder à cette page."); } } diff --git a/include/xnet.inc.php b/include/xnet.inc.php index b31c15e..0a529a8 100644 --- a/include/xnet.inc.php +++ b/include/xnet.inc.php @@ -80,6 +80,7 @@ function new_admin_page($tpl_name) global $page,$globals; require_once("xnet/page.inc.php"); $page = new XnetAdmin($tpl_name); + check_perms(); $page->assign('xorg_tpl', $tpl_name); } diff --git a/include/xnet/page.inc.php b/include/xnet/page.inc.php index 261da94..0baae38 100644 --- a/include/xnet/page.inc.php +++ b/include/xnet/page.inc.php @@ -163,7 +163,6 @@ class XnetAdmin extends XnetAuth global $globals; $this->XnetAuth($tpl, $type); - check_perms(); $this->useMenu(); if ($globals->asso('cat')) { diff --git a/include/xorg.inc.php b/include/xorg.inc.php index 6b211ed..76f3932 100644 --- a/include/xorg.inc.php +++ b/include/xorg.inc.php @@ -35,6 +35,7 @@ function _new_page($type, $tpl_name, $min_auth, $admin=false) $min_auth = AUTH_COOKIE; if (!empty($admin)) { $page = new XorgAdmin($tpl_name, $type); + check_perms(); } else switch($min_auth) { case AUTH_PUBLIC: $page = new XorgPage($tpl_name, $type); diff --git a/include/xorg/page.inc.php b/include/xorg/page.inc.php index e00fb63..1365213 100644 --- a/include/xorg/page.inc.php +++ b/include/xorg/page.inc.php @@ -111,7 +111,6 @@ class XorgAdmin extends XorgAuth function XorgAdmin($tpl, $type=SKINNED) { $this->XorgAuth($tpl, $type); - check_perms(); } // }}}