Currently, if an anonymous user does not have permission to edit a page, the edit tab will be relabelled to "view source", and the section edit links will be hidden. If the user clicks "view source", they see a generic error message: "You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in the group: Users." This is vague and discouraging.
The relationship between edit and "view source" made more sense before VisualEditor became popular. It's questionable whether "view source" is a sufficiently important operation to justify its very prominent placement on the UI for anonymous page views, at least in the main namespace.
On pt.wikipedia.org, anonymous edits were disabled by administrator actions on the site (T261133). JavaScript rewrites the edit tab for anonymous users so that it is still labelled "edit", but clicking it takes you to the login page. The login page is customised, informing the user that creating an account is required for editing. I am proposing that this feature be reimplemented in MediaWiki.
Specifically:
- Add a global configuration variable indicating that anonymous edit intention should be funnelled towards login. If it is enabled, anonymous page views should always show section edit links, and edit tabs should be labelled per VE configuration. Clicking the edit links would take you to the login page.
- When the user arrives on the login page after clicking an "edit" link, a special banner is shown, and successful login automatically returns to the edit page.
- "View source" would be available as a link from the login page banner.
- Perhaps "View source" could also be available via a link in the tools portlet in the sidebar of the page.
- For protected pages, and otherwise when the "users" group does not have edit permissions, the edit tab would show a visual indicator of being restricted (say by colour or a lock icon), but would otherwise function as described above.
- Red links would retain the current behaviour (lack of permission causes a redirect to the page view).
This task reflects my personal views. I would like to invite comments.