•  
      request #27899 Tuleap should inform MediaWiki about previous username
    Infos
    #27899
    Manuel Vacelet (vaceletm)
    2023-03-21 15:11
    2022-07-27 14:31
    29451
    Details
    Tuleap should inform MediaWiki about previous username

    With MediaWiki 1.23 embedded inside Tuleap, we (Tuleap? FusionForge inherited code?) have hacked mediawiki code to support rename of users. As MediaWiki usernames were bound to Tuleap login and Tuleap login can change... it seemed the right choice.

    However, MediaWiki doesn't support renaming of users so it was really a hack. A hack we cannot keep with 1.35 migration.

    With MediaWiki 1.35, the strategy is to user Tuleap user id as MediaWiki username (because it cannot change) and to leverage MediaWiki realname to display the correct information.

    Howerver, for users that already exists in MediaWiki 1.23 database we need to keep a backward compatibility. The decision is to settle MediaWiki username at migration at their current state.

    Example:

    • Tuleap user John Doe (login jdoe) already has an account in a Tuleap-MediaWiki 1.23 database with MediaWiki username jdoe
    • This instance is migrated to 1.35
    • MediaWiki 1.35 instance has a user whose username is jdoe
    • Tuleap user is renamed to John Foo (login jfoo), the MediaWiki user will stay at the migrated value: jdoe

    This only affects instances and users that have been doing MediaWiki prior to 1.35. All new users (on newly created instances as well as on existing, migrated, instances will have MediaWiki username = Tuleap user id

    Mediawiki Standalone
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Robert Vogel (rvogel), Dejan Savuljesku (dsavuljesku)
    Stage
    Manuel Vacelet (vaceletm)
    Closed
    2023-03-21
    Attachments
    Empty
    References
    Referencing request #27899

    Follow-ups

    User avatar

    As discussed in the call, Tuleap will, before migration, upadate the old DB with the mapping of userIds and names For that such a table is expected

    CREATE TABLE IF NOT EXISTS tuleap_user_mapping (
    	`tum_user_id` int unsigned NOT NULL,
    	`tum_user_name` VARBINARY(255) NOT NULL
    );
    

    Note that if wiki uses a dbPrefix, that will have to be included into the table name!

    If the table is present, this implementation should take care of the rest https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TuleapIntegration/+/818071