From 54cccfcc1f4e128e0a2c7f0e23c20e10107b9504 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Mon, 19 Sep 2011 00:39:20 +0200 Subject: [PATCH] Fix auth-groupe-x for non-X accounts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- modules/auth.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/auth.php b/modules/auth.php index 0d03dbf..a86313e 100644 --- a/modules/auth.php +++ b/modules/auth.php @@ -30,8 +30,8 @@ class AuthModule extends PLModule 'webservices/manageurs.php' => $this->make_hook('manageurs', AUTH_PUBLIC, 'user', NO_HTTPS), 'auth-redirect.php' => $this->make_hook('redirect', AUTH_COOKIE, 'user'), - 'auth-groupex.php' => $this->make_hook('groupex_old', AUTH_COOKIE, 'user'), - 'auth-groupex' => $this->make_hook('groupex', AUTH_PUBLIC), + 'auth-groupex.php' => $this->make_hook('groupex_old', AUTH_COOKIE, ''), + 'auth-groupex' => $this->make_hook('groupex', AUTH_PUBLIC, ''), 'admin/auth-groupes-x' => $this->make_hook('admin_authgroupesx', AUTH_MDP, 'admin'), ); } @@ -134,6 +134,10 @@ class AuthModule extends PLModule return PL_DO_AUTH; } + if (!S::user()->checkPerms('groups')) { + return PL_FORBIDDEN; + } + $this->load('auth.inc.php'); $gpex_pass = Get::s('pass'); -- 2.1.4