Page MenuHomePhabricator

The "thanks" and "undo" links on diffs have same requirements but different conditional appearance
Open, MediumPublic

Description

I regularly browse with a VPN enabled. This means I can't make edits on Wikipedia, and that's fine.

What's interesting however is that nothing in the UI changes when enabling the UI – except the appearance of "thanks" links.

I haven't looked too deeply into this yet, but this suggests two things:

  1. That the "edit" permission checks for the undo links in core (HistoryPager.php) and thank links in the Thanks extension (ThanksHooks.php) are not using the same logic (but presumably have no reason to differ for the use case of generally being IP-blocked
  2. That maybe the Thanks exension is not performing "quick" checks (as we normally do for skin rendering) but something more expensive and/or ad-hoc.

Event Timeline

Restricted Application added subscribers: MGChecker, Aklapper. · View Herald Transcript
Krinkle updated the task description. (Show Details)
HistoryPager.php
		if (  && $permissionManager->quickUserCan( 'edit', $user, $this->getTitle() ) ) {
ThanksHooks.php
		->getPermissionManager()->isBlockedFrom( $user, $this->getTitle(), true ) // via self::isUserBlockedFromTitle
		&& !$user->isBlockedGlobally()

I could not find a call to isBlockedGlobally or getGlobalBlock in PermissionManager. This suggests global blocks are generally not checked during quick checks for skin rendering logic / on page views.

I could not find a call to isBlockedGlobally or getGlobalBlock in PermissionManager. This suggests global blocks are generally not checked during quick checks for skin rendering logic / on page views.

User:isBlockedGlobally is now deprecated, and the Thanks code has been refactored. Maybe this has been fixed in the meantime.