Fix permission check on admin pages
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 11 Jul 2006 15:37:56 +0000 (15:37 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 11 Jul 2006 15:37:56 +0000 (15:37 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.10@433 839d8a87-29fc-0310-9880-83ba4fa771e5

include/platal/session.inc.php
include/xnet.inc.php
include/xnet/page.inc.php
include/xorg.inc.php
include/xorg/page.inc.php

index 3e30719..4041a42 100644 (file)
@@ -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.");
     }
 }
 
index b31c15e..0a529a8 100644 (file)
@@ -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);
 }
 
index 261da94..0baae38 100644 (file)
@@ -163,7 +163,6 @@ class XnetAdmin extends XnetAuth
         global $globals;
         
         $this->XnetAuth($tpl, $type);
-        check_perms();
 
         $this->useMenu();
         if ($globals->asso('cat')) {
index 6b211ed..76f3932 100644 (file)
@@ -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);
index e00fb63..1365213 100644 (file)
@@ -111,7 +111,6 @@ class XorgAdmin extends XorgAuth
     function XorgAdmin($tpl, $type=SKINNED)
     {
         $this->XorgAuth($tpl, $type);
-        check_perms();
     }
     
     // }}}