Add spam-training, spam-reviewing rights
Replaced the check for a moderator role in certain spam-training and -reviewing points. Make sure modhelpers can check, too.
This commit is contained in:
@@ -2472,7 +2472,7 @@ class Notice extends Managed_DataObject
|
||||
$author = $this->getProfile();
|
||||
|
||||
if ($author->hasRole(Profile_role::SILENCED)) {
|
||||
if (empty($profile) || !$profile->hasRole(Profile_role::MODERATOR)) {
|
||||
if (empty($profile) || !$profile->hasRight(Right::REVIEWSPAM)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -1190,6 +1190,8 @@ class Profile extends Managed_DataObject
|
||||
case Right::SILENCEUSER:
|
||||
case Right::DELETEUSER:
|
||||
case Right::DELETEGROUP:
|
||||
case Right::TRAINSPAM:
|
||||
case Right::REVIEWSPAM:
|
||||
$result = $this->hasRole(Profile_role::MODERATOR);
|
||||
break;
|
||||
case Right::CONFIGURESITE:
|
||||
|
Reference in New Issue
Block a user