mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Fix User::isAllowedAny() calls"
This commit is contained in:
commit
fa68be8148
|
@ -100,7 +100,7 @@ class AbuseFilterViewDiff extends AbuseFilterView {
|
|||
$this->mFilter = $this->mParams[1];
|
||||
|
||||
if ( AbuseFilter::filterHidden( $this->mFilter )
|
||||
&& !$this->getUser()->isAllowedAny( array( 'abusefilter-modify', 'abusefilter-view-private' ) )
|
||||
&& !$this->getUser()->isAllowedAny( 'abusefilter-modify', 'abusefilter-view-private' )
|
||||
) {
|
||||
$this->getOutput()->addWikiMsg( 'abusefilter-history-error-hidden' );
|
||||
return false;
|
||||
|
|
|
@ -18,7 +18,7 @@ class AbuseFilterViewHistory extends AbuseFilterView {
|
|||
|
||||
# Check perms. abusefilter-modify is a superset of abusefilter-view-private
|
||||
if ( $filter && AbuseFilter::filterHidden( $filter )
|
||||
&& !$this->getUser()->isAllowedAny( array( 'abusefilter-modify', 'abusefilter-view-private' ) )
|
||||
&& !$this->getUser()->isAllowedAny( 'abusefilter-modify', 'abusefilter-view-private' )
|
||||
) {
|
||||
$out->addWikiMsg( 'abusefilter-history-error-hidden' );
|
||||
return;
|
||||
|
@ -235,7 +235,7 @@ class AbuseFilterHistoryPager extends TablePager {
|
|||
}
|
||||
|
||||
if ( !$this->getUser()->isAllowedAny(
|
||||
array( 'abusefilter-modify', 'abusefilter-view-private' ) )
|
||||
'abusefilter-modify', 'abusefilter-view-private' )
|
||||
) {
|
||||
// Hide data the user can't see.
|
||||
$info['conds']['af_hidden'] = 0;
|
||||
|
|
Loading…
Reference in a new issue