A user who is blocked from editing a page sees a normal edit icon.
The icon for pages which are blocked shows as the edit pencil (mw-ui-icon-minerva-edit-enabled) and NOT the locked edit pencil (mw-ui-icon-minerva-edit)
Expected
- Edit shows with locked icon
- Clicking toast shows a message explaining the block
Actual
- Edit shows without locked icon
- Clicking toast shows a message explaining the block
Acceptance criteria
- If a user is blocked the edit icon in page actions and section headings should be displayed with the lock pencil (mw-ui-icon-minerva-edit)
- The talk page should not be identified as uneditable
Developer notes
In Minerva we pass a config variable "wgMinervaUserBlockInfo". If this suggests the user is blocked, the edit pencil should be locked.
Reproduction steps
setup
- Create account BlockedUser You can create a block locally for that account with an admin account by visiting Special:BlockUser.
- Make sure to untick all boxes - in particular "Prevent this user from editing their own talk page while blocked" unticked (for test) and for your sanity do not "Prevent account creation" or "Automatically block the last IP address used by this user, and any subsequent IP addresses they try to edit from" (if you do you'll need to delete the block in ipblocks table in your database.
Test
- Login as BlockedUser
- Visit User:BlockedUser when clicking talk and confirm that when clicking add discussion you can add topics
- Visit User_talk:BlockedUser as BlockedUser and the edit icon should be visible and without a lock icon. When you click it you should be able to type and save the edit.
- When visiting any other page - the edit icon appears with a lock. Clicking it shows a blocked message.