From 206cd0802351e524cc52f16c7c162eb352f2bc85 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Sun, 5 Nov 2006 12:15:34 +0000 Subject: [PATCH] Give sense to $hook['perms'] ==> non-admin cannot access admin pages !!! git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.11@1050 839d8a87-29fc-0310-9880-83ba4fa771e5 --- classes/Platal.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/Platal.php b/classes/Platal.php index 8927418..52c2b47 100644 --- a/classes/Platal.php +++ b/classes/Platal.php @@ -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; -- 2.1.4