Page MenuHomePhabricator

Change temporary user pattern configuration on beta to match the updated prefix
Closed, ResolvedPublic

Description

From T345678:

Before testwiki deployment we will only migrate usernames beginning with "~2" (there are only two such accounts based on the analysis in T346465. After testwiki deployment we will consider migrating all other usernames so that the identifier can be simple "~".

The default patterns for naming temporary users are:

'genPattern' => [ 'type' => 'string', 'default' => '*Unregistered $1' ],
'matchPattern' => [ 'type' => 'string|array', 'default' => '*$1' ],
'reservedPattern' => [ 'type' => 'string|null', 'default' => null ],

...with accompanying documentation:

- genPattern: (string) The pattern used when generating new usernames.
  This should have "$1" indicating the place where the serial string will
  be substituted.
- matchPattern: (string|string[]) The pattern used when determining whether a
  username is a temporary user. This affects the rights of the user
  and also prevents explicit creation of users with matching names.
  This is ignored if "enabled" is false.
- reservedPattern: (string) A pattern used to determine whether a
  username should be denied for explicit creation, in addition to
  matchPattern. This is used even if "enabled" is false.

Ahead of testwiki deployment, we should update these on beta to:

$wgAutoCreateTempUser['genPattern'] = '~$1';
$wgAutoCreateTempUser['matchPattern'] = ['*$1', '~2$1'];
$wgAutoCreateTempUser['reservedPattern'] = '~$1';
$wgAutoCreateTempUser['serialProvider']['useYear'] = true;

Event Timeline

Tchanders renamed this task from Change temporary user pattern configuration on beta to match the updated format to Change temporary user pattern configuration on beta to match the updated prefix.Oct 23 2023, 10:36 AM

We'll support multiple matchPatterns, as discussed in T349489#9438720. This will allow us to recognise user names starting with * and with ~ as temporary on beta.

Let's do that in a subtask of this, then we can update this task description once we're sure how the config will look.

Change 992670 had a related patch set uploaded (by STran; author: STran):

[operations/mediawiki-config@master] Update beta configs to reflect new temp account naming pattern

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

Change 992670 merged by jenkins-bot:

[operations/mediawiki-config@master] Update beta configs to reflect new temp account naming pattern

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