From 1d82f2d0f6be46e3fab71168e0a7ce4182398635 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Thu, 11 Aug 2011 00:50:13 +0200 Subject: [PATCH] Don't add 'user' perm automatically. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/user.php | 1 - classes/xorgsession.php | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) 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'); -- 2.1.4