From: Roland Haeder Date: Sun, 14 Feb 2016 16:10:38 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' into social-master X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=44ebf768ba60377b29b6c765020410a0c115e91a;p=quix0rs-gnu-social.git Merge remote-tracking branch 'upstream/master' into social-master Signed-off-by: Roland Haeder --- 44ebf768ba60377b29b6c765020410a0c115e91a diff --cc plugins/ModHelper/ModHelperPlugin.php index b37ea44578,88f2f2a731..c5ec8854a5 --- a/plugins/ModHelper/ModHelperPlugin.php +++ b/plugins/ModHelper/ModHelperPlugin.php @@@ -42,10 -40,12 +40,12 @@@ class ModHelperPlugin extends Plugi return true; } - function onUserRightsCheck($profile, $right, &$result) + function onUserRightsCheck(Profile $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;