Page MenuHomePhabricator

Title->userCan( 'edit' ) may return false positive
Closed, ResolvedPublic

Description

Author: nickpj

Description:
Attaching a patch for this against r23108. I haven't applied it in case there's something bleedingly obvious that I am missing.

In includes/Title.php, Title->userCan( 'edit' ) seems to always return true, even if the user has "$wgGroupPermissions['*']['edit'] = false;" in their LocalSettings.php .

This does not seem right, and causes the TalkHere extension to behave incorrectly (always shows an "Add comment" link, even when the user cannot add a comment).


Version: 1.10.x
Severity: normal

Attached:

Details

Reference
bz10332

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:49 PM
bzimport set Reference to bz10332.
bzimport added a subscriber: Unknown Object (MLST).

nickpj wrote:

Added in r23996, marked as resolved.

webboy wrote:

Patch to fix this bug for all actions

There are other actions (like 'delete') affected by this bug. This patch will fix this bug for all actions.

Attached:

This will be fixed in my upcoming userCan changes, and I see little immense need to apply the patch before they are applied - seeing as it's a completeness issue rather than an actual software error.