}
$scoped = $action->getScoped();
- if (!$scoped instanceof Profile || !$scoped->hasRight(self::VIEWMODLOG)) {
- // only continue if we are allowed to VIEWMODLOG
+ if (!$scoped->hasRight(Right::SILENCEUSER)) {
+ // only show registration IP if we have the right to silence users
return true;
}
protected function doPreparation()
{
- if (!$scoped->hasRight(self::VIEWMODLOG) && !$scoped->hasRole(Profile_role::ADMINISTRATOR)) {
- throw new AuthorizationException(_('You do not have privileges to see this page'));
+ if (!$scoped->hasRight(Right::SILENCEUSER) && !$scoped->hasRole(Profile_role::ADMINISTRATOR)) {
+ throw new AuthorizationException(_('You are not authorized to view this page.'));
}
$this->ipaddress = $this->trimmed('ipaddress');