forked from GNUsocial/gnu-social
Update the comment on silencing privileged users in ModHelper
This commit is contained in:
parent
e5ad98e601
commit
3cef75bcac
@ -17,9 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('STATUSNET')) {
|
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package ModHelperPlugin
|
* @package ModHelperPlugin
|
||||||
@ -45,7 +43,9 @@ class ModHelperPlugin extends Plugin
|
|||||||
function onUserRightsCheck($profile, $right, &$result)
|
function onUserRightsCheck($profile, $right, &$result)
|
||||||
{
|
{
|
||||||
if (in_array($right, self::$rights)) {
|
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')) {
|
if ($profile->hasRole('modhelper')) {
|
||||||
$result = true;
|
$result = true;
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user