mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Hide the checkbox for protecting a filter from users without the right
Any filter using protected variables must be marked as protected via the a checkbox on the filter edit form. This checkbox should not be visible to users without the right to use protected variables. Bug: T364485 Change-Id: If2c4b8f50f447e951d820798f181839d10501aa3
This commit is contained in:
parent
1c96981117
commit
6428ff9232
|
@ -474,7 +474,10 @@ class AbuseFilterViewEdit extends AbuseFilterView {
|
|||
}
|
||||
|
||||
if ( $checkboxId == 'protected' ) {
|
||||
if ( $filterObj->isProtected() ) {
|
||||
if ( !$this->afPermManager->canViewProtectedVariables( $user ) ) {
|
||||
$checkboxAttribs['classes'] = [ 'oo-ui-element-hidden' ];
|
||||
$labelAttribs['classes'] = [ 'oo-ui-element-hidden' ];
|
||||
} elseif ( $filterObj->isProtected() ) {
|
||||
$checkboxAttribs['disabled'] = true;
|
||||
$labelAttribs['label'] = $this->msg(
|
||||
'abusefilter-edit-protected-variable-already-protected'
|
||||
|
|
Loading…
Reference in a new issue