Check in CentralAuth to see if users can be maintained on the import
Open, NormalPublic

Description

Assuming that the users on the revisions retrieved are the same as the users on the target site would be a bad assumption in my opinion.

The extension should check if the user on the source wiki matches the user with the same name on the local wiki.

In theory this extension can be used on wikis outside of the WMF cluster and also on wikis without CentralAuth installed or without finalization.
In an initial version it would be okay to error out in those cases, but thought should be put into the design to allow importing with a different matched username (throguh CA) or with the importing users username.

Addshore created this task.Mar 21 2017, 6:06 PM
Addshore claimed this task.
Restricted Application added a project: User-Addshore. · View Herald TranscriptTue, Oct 3, 12:40 PM

When importing MediaWiki creates a user object based on the user string:

https://github.com/wikimedia/mediawiki/blob/36c9145c218c6effcfc672b89cc54579a2749cb4/includes/import/WikiRevision.php#L586

The same thing happens for importing image revisions:

https://github.com/wikimedia/mediawiki/blob/36c9145c218c6effcfc672b89cc54579a2749cb4/includes/import/WikiRevision.php#L789

This is the default behaviour of importing in mediawiki and I don't think we need to change anything here (as I suspected).

Although I would like review of this conclusion and probably a small discussion in the next meeting.

Let's quickly check this together with @WMDE-Fisch. Adding @daniel here because he might have some insights on this as well.

@WMDE-Fisch @daniel could you give a quick thumb-up or thumb-down whether this makes sense for you?

So if I get it right, since the default behavior of MW when importing stuff is to just create user objects based on the string the supposed solution is, that we also will just do that and do not introduce any additional checks, right?

So if I get it right, since the default behavior of MW when importing stuff is to just create user objects based on the string the supposed solution is, that we also will just do that and do not introduce any additional checks, right?

Indeed

I am good with that. It seems to reflect the pragmatic way to deal with these issues.