Page MenuHomePhabricator

Don't require changecontentmodel right to create CollaborationHub and CollaborationList content models
Open, Needs TriagePublic

Description

It looks like a good chunk of the reason for changecontentmodel being a restricted right in general is because the main other content models involve technical stuff that can introduce some scary security things. In this case, however, we're creating/switching between content content models, as opposed to different technical things.

Thus in this case, any given user and their dog should be able to make/unmake hubs and lists if they're allowed to edit and create stuff in the relevant namespace at all.

Unclear where it's actually being blocked - probably it isn't just the extension (though CK does check the right too before showing the options), as we are largely shelling out to core to actually do the stuff (duh), which probably has its own permissions checks... can these be changed/overridden at all?

Event Timeline

Main reason its restricted is it used to be autoconfirm but enwiki got mad (if i recall)

Slightly more seriously, do we have specific issues with it? Or ways to make it more... specific (some methods requiring the right, others not?)

Related issue: changecontentmodel is also needed to create mass message lists: T92795

An extant workaround for temporary userrights is described in T227772, with various examples.

Similar to other content models, can't this be resolved with a page creation trigger to create the page in the appropriate model directly? For example, creating a JSON, JS, or CSS page doesn't require direct changecontentmodel permissions. As such, extension based utilities such as Special:CreateCollaborationHub should be able to skip that permissions check as well.