]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/ModHelper/ModHelperPlugin.php
Add spam-training, spam-reviewing rights
[quix0rs-gnu-social.git] / plugins / ModHelper / ModHelperPlugin.php
index c2757bbeae5cb4c0a974866e140cca788e7bd773..bed0d8d49e3d8160e98535d3e2e5cf347aecb663 100644 (file)
@@ -27,6 +27,8 @@ if (!defined('STATUSNET')) {
  */
 class ModHelperPlugin extends Plugin
 {
+    static $rights = array(Right::SILENCEUSER, Right::TRAINSPAM, Right::REVIEWSPAM);
+
     function onPluginVersion(&$versions)
     {
         $versions[] = array('name' => 'ModHelper',
@@ -42,7 +44,7 @@ class ModHelperPlugin extends Plugin
 
     function onUserRightsCheck($profile, $right, &$result)
     {
-        if ($right == Right::SILENCEUSER) {
+        if (in_array($right, self::$rights)) {
             // Hrm.... really we should confirm that the *other* user isn't privleged. :)
             if ($profile->hasRole('modhelper')) {
                 $result = true;