Page MenuHomePhabricator

Allow read-only CentralNotice banner preview for logged-in users without the centralnotice-admin right
Closed, ResolvedPublic

Description

The banner preview functionality on Special:CentralNoticeBanners (when going into edit mode for a banner) does not work for users who do not have centralnotice-admin rights.

There is an error:

Error loading banner preview
You are not authorized to preview banners, or your edit token has expired. Please try logging in again or reloading the page.

In fixing T420810, all elements of the Special:CentralNoticeBanners/edit form are disabled for editing if the user does not have centralnotice-admin rights, and we removed the preview section of the page for users who are not allowed to view a preview.

As a follow up, we could allow preview to work for users without centralnotice-admin and then change the page to show the preview section again. Every other part of the form should remain disabled for editing. (view-only)

Event Timeline

Change #1281760 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/CentralNotice@master] Add banner preview link users without centralnotice admin permissions

https://gerrit.wikimedia.org/r/1281760

Change #1281973 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/CentralNotice@master] Restore banner preview link for non-editors

https://gerrit.wikimedia.org/r/1281973

Change #1281760 abandoned by Aude:

[mediawiki/extensions/CentralNotice@master] Add banner preview link for non centralnotice admins

https://gerrit.wikimedia.org/r/1281760

Change #1281973 merged by jenkins-bot:

[mediawiki/extensions/CentralNotice@master] Restore banner preview link for non-editors

https://gerrit.wikimedia.org/r/1281973

This was fixed at the hackathon in Milan.

There is a [ Preview on wiki ] link for users without CentralNotice admin permissions to preview the banners.