Improved AbstractModerationQueueHandler implementation
authorMarcel Werk <burntime@woltlab.com>
Mon, 1 Sep 2014 16:28:13 +0000 (18:28 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 1 Sep 2014 16:28:13 +0000 (18:28 +0200)
wcfsetup/install/files/lib/system/moderation/queue/AbstractModerationQueueHandler.class.php

index e42e02df43fd6ca1c33c78c7d1bbb63f17ed5c46..23d8d41de722ac2120abb1820326653635e29398 100644 (file)
@@ -38,6 +38,12 @@ abstract class AbstractModerationQueueHandler implements IModerationQueueHandler
         */
        protected $objectType = '';
        
+       /**
+        * required permission for assigned users
+        * @var string
+        */
+       protected $requiredPermission = 'mod.general.canUseModeration';
+       
        /**
         * @see \wcf\system\moderation\queue\IModerationQueueHandler::identifyOrphans()
         */
@@ -105,6 +111,6 @@ abstract class AbstractModerationQueueHandler implements IModerationQueueHandler
         */
        public function isAffectedUser(ModerationQueue $queue, $userID) {
                $user = new UserProfile(new User($userID));
-               return $user->getPermission('mod.general.canUseModeration');
+               return $user->getPermission($this->requiredPermission);
        }
 }