Don't depend on ModLog
This commit is contained in:
parent
be35975b12
commit
799c2e47fe
|
@ -155,8 +155,8 @@ class RegisterThrottlePlugin extends Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
$scoped = $action->getScoped();
|
$scoped = $action->getScoped();
|
||||||
if (!$scoped instanceof Profile || !$scoped->hasRight(self::VIEWMODLOG)) {
|
if (!$scoped->hasRight(Right::SILENCEUSER)) {
|
||||||
// only continue if we are allowed to VIEWMODLOG
|
// only show registration IP if we have the right to silence users
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ class IpregistrationsAction extends ManagedAction
|
||||||
|
|
||||||
protected function doPreparation()
|
protected function doPreparation()
|
||||||
{
|
{
|
||||||
if (!$scoped->hasRight(self::VIEWMODLOG) && !$scoped->hasRole(Profile_role::ADMINISTRATOR)) {
|
if (!$scoped->hasRight(Right::SILENCEUSER) && !$scoped->hasRole(Profile_role::ADMINISTRATOR)) {
|
||||||
throw new AuthorizationException(_('You do not have privileges to see this page'));
|
throw new AuthorizationException(_('You are not authorized to view this page.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->ipaddress = $this->trimmed('ipaddress');
|
$this->ipaddress = $this->trimmed('ipaddress');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user