X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fauth.php;h=8f71fdac0a8f4e67cf55a62d47724254318dd6f2;hb=bd803525db63a497d3b1b5ee90e5b560e9fc60f1;hp=635c8f1477c5f0e3c7c1cc73833a91911582e31f;hpb=959221f7482b51bb1b3f03d86aeabc0bd246205a;p=platal.git diff --git a/modules/auth.php b/modules/auth.php index 635c8f1..8f71fda 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_PASSWD, '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'); @@ -221,7 +225,7 @@ class AuthModule extends PLModule http_redirect($returl); } else if (S::admin()) { - $page->kill("La requête d'authentification a échouée (url de retour invalide)."); + $page->kill("La requête d'authentification a échoué (url de retour invalide)."); } } }