mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Let abusefilter-modify users see history of hidden filters
d0439337
(I9e15326c) made abusefilter-view-private required
even for users with abusefilter-modify that can see and
change private filters.
Bug: T143365
Change-Id: I401effc5f1e429b5ec12c7f48dcc00ada74eafb6
This commit is contained in:
parent
66afef7840
commit
bb277d437e
|
@ -100,7 +100,7 @@ class AbuseFilterViewDiff extends AbuseFilterView {
|
|||
$this->mFilter = $this->mParams[1];
|
||||
|
||||
if ( AbuseFilter::filterHidden( $this->mFilter )
|
||||
&& !$this->getUser()->isAllowed( 'abusefilter-view-private' )
|
||||
&& !$this->getUser()->isAllowedAny( array( 'abusefilter-modify', 'abusefilter-view-private' ) )
|
||||
) {
|
||||
$this->getOutput()->addWikiMsg( 'abusefilter-history-error-hidden' );
|
||||
return false;
|
||||
|
|
|
@ -16,9 +16,9 @@ class AbuseFilterViewHistory extends AbuseFilterView {
|
|||
$out->setPageTitle( $this->msg( 'abusefilter-filter-log' ) );
|
||||
}
|
||||
|
||||
# Check perms
|
||||
# Check perms. abusefilter-modify is a superset of abusefilter-view-private
|
||||
if ( $filter && AbuseFilter::filterHidden( $filter )
|
||||
&& !$this->getUser()->isAllowed( 'abusefilter-view-private' )
|
||||
&& !$this->getUser()->isAllowedAny( array( 'abusefilter-modify', 'abusefilter-view-private' ) )
|
||||
) {
|
||||
$out->addWikiMsg( 'abusefilter-history-error-hidden' );
|
||||
return;
|
||||
|
@ -234,7 +234,9 @@ class AbuseFilterHistoryPager extends TablePager {
|
|||
$info['conds']['afh_filter'] = $this->mFilter;
|
||||
}
|
||||
|
||||
if ( !$this->getUser()->isAllowed( 'abusefilter-view-private' ) ) {
|
||||
if ( !$this->getUser()->isAllowedAny(
|
||||
array( 'abusefilter-modify', 'abusefilter-view-private' ) )
|
||||
) {
|
||||
// Hide data the user can't see.
|
||||
$info['conds']['af_hidden'] = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue