Page MenuHomePhabricator

Right 'banner-protect' is missing i18n descriptions
Closed, ResolvedPublic

Description

A new right, banner-protect seems to have been added to MediaWiki-extensions-CentralNotice. However I cannot encounter said right with i18n definitions, as can be checked at https://codesearch.wmflabs.org/search/?q=banner-protect&i=nope&files=&repos=.

Please provide a description for said right and add it to MediaWiki-extensions-CentralNotice.

Thank you.

Event Timeline

Pardon my ignorance but the more I look at the right banner-protect, the less I understand it. Banner codes hosted in the MediaWiki namespace (ie: Meta-Wiki) are now "centralnoticeadmin" protected. As such people outside the "centralnoticeadmin" group shouldn't be able to edit them.

Do we have any use case for 'banner-protect' then? Or does 'banner-protect' allow central notice administrators to be able to protect banner code to said 'centralnoticeadmin' level (akin to the full 'protect' permissions sysops hold?)

I could upload a patch for en/qqq.json real quick if I knew what 'banner-protect' was for.

Thanks.

Thanks, @MarcoAurelio! Indeed, this should be documented properly. The banner-protect right is used to protect translatable banner messages handled by the translate extension. The goal is to ensure that translation managers can approve and publish translations for those messages without permission to modify other banner content.

I'm still looking into a few related follow-up details for these recent changes... I think that probably the best course of action is to get back to this once everything else related is completely settled. Hope that's ok!!!

Thanks again!

Since banner-protect is defined in wmf-settings (rOMWC7d084e54705) and not in the actual extension code, that means the documentation string should be in the MediaWiki messages namespace on-wiki, right?

If it's a Wikimedia-specific thing, then the messages should go in the WikimediaMessages extension. (Of course, if this is useful to other wikis that use CentralNotice, then it would be nice to move it into the extension itself).

@Ejegg Thanks for your reply. Would then:

"banner-protect": "Protect translatable banner messages handled by the translate extension"

be an appropriate i18n summary to display on Special:ListGroupRights?

If that's so, I can create a patch for WikimediaMessages since I don't see the right exist outside Wikimedia Config (not adding to MediaWiki namespace as that'd cause that other users not using English as UI language will still get a broken message).

Best regards.

@Ejegg Thanks for your reply. Would then:

"banner-protect": "Protect translatable banner messages handled by the translate extension"

be an appropriate i18n summary to display on Special:ListGroupRights?

Sounds almost right!!! What about this: "Protect translatable messages handled by the translate extension and included in CentralNotice banners."

If that's so, I can create a patch for WikimediaMessages since I don't see the right exist outside Wikimedia Config (not adding to MediaWiki namespace as that'd cause that other users not using English as UI language will still get a broken message).

Ok, thanks much!!!

if this is useful to other wikis that use CentralNotice, then it would be nice to move it into the extension itself

Hmmm... We could do it that way... However, non-WMF uses of CentralNotice are few and far between, and it seems unlikely anyone has rights managements as intricate as ours. So, the WMF-specific extension sounds right. Thanks!!!

Sounds almost right!!! What about this: "Protect translatable messages handled by the translate extension and included in CentralNotice banners."

Perfect. Patch incoming shortly.

MarcoAurelio triaged this task as Medium priority.

Change 479129 had a related patch set uploaded (by MarcoAurelio; owner: MarcoAurelio):
[mediawiki/extensions/WikimediaMessages@master] Add keys for 'banner-protect' permissions

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

Change 479129 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@master] Add keys for 'banner-protect' permissions

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

Great, thanks so much!!

It took me a bit of poking to find where all the messages are actually used.

right-banner-protect shows up on Special:ListGroupRights.
protect-level-banner-protect is on the form to change pages' protection levels.
restriction-level-banner-protect is used on Special:ProtectedPages.

Seems like this should be documented somewhere... While the first message is mentioned in Manual:User_rights, I couldn't find the last two explained anywhere. I guess I'll add them there and in Manual:$wgRestrictionLevels (unless anyone has a better suggestion). :)

Just to note, for completeness, protect-level-banner-protect is also shown on the Special:RecentChanges and in the revision history of each banner's Mediawiki namespace page.

Change 484282 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/WikimediaMessages@master] Improve qqq doc for banner-protect permissions

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

^ Just some minor tweaks to the qqq documentation. We should create a doc- template on Translate Wiki for this, since there are other (previously similar) message documentation strings.

Change 484282 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@master] Improve qqq doc for banner-protect permissions

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