]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Update the comment on silencing privileged users in ModHelper
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 12 Feb 2016 13:38:03 +0000 (14:38 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 12 Feb 2016 13:47:44 +0000 (14:47 +0100)
plugins/ModHelper/ModHelperPlugin.php

index 2752a2153947302d251aabf8374d381e32412f44..88f2f2a73185977e6b79b4aab196e9379cc8bd1f 100644 (file)
@@ -17,9 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * @package ModHelperPlugin
@@ -45,7 +43,9 @@ class ModHelperPlugin extends Plugin
     function onUserRightsCheck($profile, $right, &$result)
     {
         if (in_array($right, self::$rights)) {
-            // Hrm.... really we should confirm that the *other* user isn't privleged. :)
+            // To silence a profile without accidentally silencing other
+            // privileged users, always call Profile->silenceAs($actor)
+            // since it checks target's privileges too.
             if ($profile->hasRole('modhelper')) {
                 $result = true;
                 return false;