From: x2003bruneau Date: Sun, 5 Nov 2006 12:15:34 +0000 (+0000) Subject: Give sense to $hook['perms'] ==> non-admin cannot access admin pages !!! X-Git-Tag: xorg/0.9.11~3 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=206cd0802351e524cc52f16c7c162eb352f2bc85;p=platal.git 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 --- 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;