->userHasRight( $user, 'applychangetags' )
) {
return Status::newFatal( 'tags-apply-no-permission' );
- } elseif ( $user->getBlock() ) {
- // @TODO Ensure that the block does not apply to the `applychangetags`
- // right.
+ } elseif ( $user->getBlock() && $user->getBlock()->isSitewide() ) {
return Status::newFatal( 'tags-apply-blocked', $user->getName() );
}
}
->userHasRight( $user, 'changetags' )
) {
return Status::newFatal( 'tags-update-no-permission' );
- } elseif ( $user->getBlock() ) {
- // @TODO Ensure that the block does not apply to the `changetags`
- // right.
+ } elseif ( $user->getBlock() && $user->getBlock()->isSitewide() ) {
return Status::newFatal( 'tags-update-blocked', $user->getName() );
}
}
->userHasRight( $user, 'managechangetags' )
) {
return Status::newFatal( 'tags-manage-no-permission' );
- } elseif ( $user->getBlock() ) {
- // @TODO Ensure that the block does not apply to the `managechangetags`
- // right.
+ } elseif ( $user->getBlock() && $user->getBlock()->isSitewide() ) {
return Status::newFatal( 'tags-manage-blocked', $user->getName() );
}
}
->userHasRight( $user, 'managechangetags' )
) {
return Status::newFatal( 'tags-manage-no-permission' );
- } elseif ( $user->getBlock() ) {
- // @TODO Ensure that the block does not apply to the `managechangetags`
- // right.
+ } elseif ( $user->getBlock() && $user->getBlock()->isSitewide() ) {
return Status::newFatal( 'tags-manage-blocked', $user->getName() );
}
}
->userHasRight( $user, 'managechangetags' )
) {
return Status::newFatal( 'tags-manage-no-permission' );
- } elseif ( $user->getBlock() ) {
- // @TODO Ensure that the block does not apply to the `managechangetags`
- // right.
+ } elseif ( $user->getBlock() && $user->getBlock()->isSitewide() ) {
return Status::newFatal( 'tags-manage-blocked', $user->getName() );
}
}
->userHasRight( $user, 'deletechangetags' )
) {
return Status::newFatal( 'tags-delete-no-permission' );
- } elseif ( $user->getBlock() ) {
- // @TODO Ensure that the block does not apply to the `deletechangetags`
- // right.
+ } elseif ( $user->getBlock() && $user->getBlock()->isSitewide() ) {
return Status::newFatal( 'tags-manage-blocked', $user->getName() );
}
}