From 1f533e255f8e77fc3ea481d33ae6abb5d355a506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 27 Feb 2014 19:25:30 +0100 Subject: [PATCH] Fix permissions of temporary rooms --- file/lib/data/room/Room.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file/lib/data/room/Room.class.php b/file/lib/data/room/Room.class.php index 99bde6a..0082db5 100644 --- a/file/lib/data/room/Room.class.php +++ b/file/lib/data/room/Room.class.php @@ -48,8 +48,8 @@ public function canEnter(\wcf\data\user\User $user = null) { if (!$user->userID) return false; $user = new \wcf\data\user\UserProfile($user); - if ($user->getPermission('admin.chat.canManageSuspensions')) return true; - if ($user->getPermission('mod.chat.canGban')) return true; + if ($this->isPermanent && $user->getPermission('admin.chat.canManageSuspensions')) return true; + if ($this->isPermanent && $user->getPermission('mod.chat.canGban')) return true; $ph = new \chat\system\permission\PermissionHandler($user->getDecoratedObject()); if ($ph->getPermission($this, 'mod.canAlwaysEnter')) return true;