From: Raphaël Barrois Date: Wed, 10 Aug 2011 22:50:13 +0000 (+0200) Subject: Don't add 'user' perm automatically. X-Git-Tag: xorg/1.1.3~19 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=1d82f2d0f6be46e3fab71168e0a7ce4182398635;p=platal.git Don't add 'user' perm automatically. Signed-off-by: Raphaël Barrois --- diff --git a/classes/user.php b/classes/user.php index 8647ddd..bd58db8 100644 --- a/classes/user.php +++ b/classes/user.php @@ -886,7 +886,6 @@ class User extends PlUser public static function makePerms($perms, $is_admin) { $flags = new PlFlagSet($perms); - $flags->addFlag(PERMS_USER); if ($is_admin) { $flags->addFlag(PERMS_ADMIN); } diff --git a/classes/xorgsession.php b/classes/xorgsession.php index 815ad81..3862b91 100644 --- a/classes/xorgsession.php +++ b/classes/xorgsession.php @@ -228,7 +228,10 @@ class XorgSession extends PlSession $this->securityChecks(); $this->setSkin(); $this->updateNbNotifs(); - check_redirect(); + // Only check email redirection for 'internal' users. + if ($user->checkPerms(PERMS_USER)) { + check_redirect(); + } // We should not have to use this private data anymore S::kill('auth_by_cookie');