Give sense to $hook['perms'] ==> non-admin cannot access admin pages !!!
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 5 Nov 2006 12:15:34 +0000 (12:15 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 5 Nov 2006 12:15:34 +0000 (12:15 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.11@1050 839d8a87-29fc-0310-9880-83ba4fa771e5

classes/Platal.php

index 8927418..52c2b47 100644 (file)
@@ -98,6 +98,10 @@ class Platal
         $args    = $this->argv;
         $args[0] = &$page;
 
+        if (strlen($hook['perms']) && $hook['perms'] != Session::v('perms')) {
+            return PL_FORBIDDEN;
+        }
+
         if ($hook['auth'] > S::v('auth', AUTH_PUBLIC)) {
             global $globals;