Page MenuHomePhabricator

change blocked user's edit tabs to view source tabs
Closed, DuplicatePublic

Description

for blocked users, the tabs say edit instead of view source. Can you please change it so that if a user does not have permission to make that edit for any reason the tab says view source?

Event Timeline

I can reproduce the problem. Note that "View source" tab is been present on protected pages.

blocked users see "edit" instead of "view source". And title blacklisted titles also see an "edit" tab instead of "view source". The tabs should say "view source" for the previous two.

This is mostly intentional.

Checking for blocks is a relatively expensive operation (it's a separate database query, plus potentially inserting a new block in case of autoblocks, plus potentially clearing the block if it expired), and therefore we do not do this unless necessary (i.e. when actually attempting to edit) to improve the performance in the common case where the user is not blocked. This is a duplicate of T7106.

The title blacklist situation is similar. This is a duplicate of T30589 (currently marked as declined).

There are some other situations where this occurs. Another one I'm aware of is cascade protection (T13700).