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:
Evan Prodromou
2012-03-25 13:16:23 -04:00
parent 76e6bee6aa
commit 0d487a1ea0
5 changed files with 9 additions and 3 deletions

View File

@@ -95,7 +95,7 @@ class ProfileNoticeStream extends ScopingNoticeStream
if (common_config('notice', 'hidespam')) {
if ($this->streamProfile->hasRole(Profile_role::SILENCED) &&
(empty($this->userProfile) || !$this->userProfile->hasRole(Profile_role::MODERATOR))) {
(empty($this->userProfile) || !$this->userProfile->hasRight(Right::REVIEWSPAM))) {
return true;
}
}

View File

@@ -68,5 +68,7 @@ class Right
const CREATEGROUP = 'creategroup';
const WEBLOGIN = 'weblogin';
const API = 'api';
const REVIEWSPAM = 'reviewspam';
const TRAINSPAM = 'trainspam';
}